[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Threads and garbagecollection
- From: David Jones <drj@...>
- Date: Sun, 24 Aug 2003 12:00:54 +0000
In message <firstname.lastname@example.org>, Antero Vipunen writes:
> Hello All,
> How does Lua detect that thread must be garbagecollected?
A thread is just like any other value in Lua when it comes to garbage
collection. If the thread becomes unreachable from the roots - that is
not stored in a global variable, on the stack, or reachable via a chain
of references from any of those - then the next time the garbage
collector runs it will reclaim the thread.