lua-users home
lua-l archive

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


In message <703308666.20030824163416@ngs.ru>, 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.

Cheers,
 drj