lua-users home
lua-l archive

Re: Debugging crashes on GC

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


> 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.
- DC

AltStyle によって変換されたページ (->オリジナル) /