lua-users home
lua-l archive

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


I have not understand your example about running and normal status.
Can you give me further explains?

For "coroutine.status(coroutine.running())", what means ?

Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> co2 = coroutine.create(function() print(coroutine.status(co1)) end)
> co1 = coroutine.create(function()
print(coroutine.status(coroutine.running())) coroutine.resume(co2) end)
> coroutine.resume(co1)
running
normal