[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Debugging crashes on GC
- From: "Daniel Collins" <daniel.collins@...>
- Date: Wed, 26 Jul 2006 10:26:33 +0930
> Yes. You see, a coroutine is just an object itself. When no
> references to it remain, it will be collected sooner or
> later, just like any other unreferenced object.
The way I deal with this is to simply store a reference to the thread in
the registry. Then when I am finished with the thread I set that
reference to nil. I am pretty sure this is the standard way to manage
threads and coroutines created from C.