[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Coroutines & C boundaries
- From: Adrian Sietsma <adrian_groups@...>
- Date: Wed, 15 Feb 2006 00:54:40 +1100
David Given wrote:
[...]
How does yield() know where to transfer execution to? Does it go to the most
recent resume() that caused the current coroutine to be run?
yes.
yield() returns to the caller of the coroutine, ie. coroutine.resume() will
return when the resumed coroutine yields, returns, or dies.
Adrian