[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A problem about coroutine's status
- From: Patrick Donnelly <batrick@...>
- Date: Sun, 29 Mar 2009 01:05:37 -0600
Hi Lee,
On Sun, Mar 29, 2009 at 12:21 AM, lee <leeyacn@126.com> 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 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
--
-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