|
Actually, I’ve determined that
lua_resume() is not failing but rather my script is aborting after a call is
made to lua_yield(thread, 0) from a C-function invoked by the script. Has something changed in the yield
behavior for threads? From:
lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On
Behalf Of Brian Hassink The following (simplified) sequence works under 5.0.2… lua_State* thread = lua_newthread(L); refKey = luaL_ref(L, LUA_REGISTRYINDEX); lua_pcall(thread, 0, 0, 0); lua_getglobal(thread, "main"); lua_pushnumber(thread, id); lua_resume(thread, 1); …but under 5.1 the call to lua_resume() fails, and
lua_tostring(thread, -1) returns an inconsistent numerical value (in the range
of 0 through 60). Is there something about this sequence that is no longer
valid under 5.1? Thanks, Brian |