[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: kill coroutine
- From: Rici Lake <lua@...>
- Date: Sat, 20 Aug 2005 19:41:05 -0500
On 20-Aug-05, at 7:19 PM, David Given wrote:
I am curious to know what happens if a coroutine nils out its own last
reference, though. Does the program counter carry an implicit
the code its executing? What happens when the coroutine yields?
The currently running thread (and therefore its stack) are always part
of the gc root. So is the "main thread" (and its stack).
If there is no reference left to a coroutine and the coroutine yields,
then it will get garbage collected at some point.