Hi, i've already sent you a mail about this a few weeks ago but it seems that you're more active around here
Calling functions on a state while a child thread state is running a coroutine seems to break it. My current workaround is to duplicate every operation i do to another state, which i then exclusively use to branch thread states out of. This is obviously not ideal, and poses all sort of other logistical issues.
Is this a limitation of the current version ? The in-dev one mentions coroutines as being wip, do you have a time estimate on the feature's release ?
The issue can be easily reproduced on a blank project using the following code :
state = lua_state_create() lua_add_code(state, @" function test(num) for i = 1, num do coroutine.yield(i) end end function disrupt() end "); th = lua_thread_create(state); if (lua_call_start(th, "test", 10)) { while (lua_call_next(th)) { show_debug_message("yield: " + string(lua_call_result)); for (var i = 0; i < 5; i++) { lua_call(state, "disrupt") } } show_debug_message("result: " + string(lua_call_result)); }
Thanks for your time.