lua-users home
lua-l archive

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

Hi Lee,

On Sun, Mar 29, 2009 at 12:21 AM, lee <> wrote:
> who can give me a example that show “running” and “normal” status ?
> That’s, which conditions we can receive coroutine’s running and normal
> status?

Lua 5.1.4  Copyright (C) 1994-2008, 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)

-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant