Hi, all
I have add coroutine support in Lua, and provide two extension functions for Lua coroutine.
coroutine.start(func) – create new coroutine and resume it. the function code:
function coroutine.start(func)
local co = coroutine.create(func)
return coroutine.resume(co)
end
coroutine.sleep(time) – sleep current coroutine, it will wake up until the time arrived.
I think it is helpful. For more information, please refer the Coroutine.lua sample in LuaScripts.