lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I just wasted a lot of time getting LuaJava up and running in my current project, only to discover that a key feature isn't supported: coroutines.

If you try to call a Java function from a coroutine using LuaJava, it fails, because the architecture only keeps track of a single Lua state per thread. And there doesn't seem to be a quick workaround to fix it. I've wasted too much time with this already; I may have to abandon using Lua in this project as a result, since the project has a tight deadline, and I need things to be working NOW, not after I've rewritten LuaJava to work correctly, and I can sacrifice some project flexibility (i.e., Lua scripting) if I have to, but I can't take extra time to make things work.

If anyone knows of a patched LuaJava that works with coroutines, please point me at it. Honestly it doesn't look hard to patch, and I have some thoughts on how to patch it, but not the time to do it.

Regardless, can someone with the right permissions please modify the LuaJava project documentation at the Kepler Project to add a warning to prevent hapless developers like myself from having to figure out the hard way that it's broken with respect to coroutines? When a project like LuaJava claims to support Lua, and even contains helper functions to create and yield coroutines, one might naturally assume that it supports coroutines. I want my wasted day back. :(

This is on Android, so jnlua doesn't build (needs JavaBeans, which itself doesn't build...). Alternately, if someone knows of a working jnlua port to Android, that could potentially help.

Tim