lua-users home
lua-l archive

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


>In 5.0 beta, it looks like Lua can now detect completed threads. The 
>lua_closethread() function was removed, presumably because "dead 
>thread detection" was now implemented.

The major change in Lua 5.0 beta is that threads are now Lua values and
so are subject to garbage collection. Any thread that has no references
becomes garbage and are "closed" when collected.

>My question is: since the lua_closethread() function has been removed 
>in 5.0 beta, is there still a way to manually kill a thread that is 
>still active?

The only way is make sure its value is no longer referenced and then force a 
garbage collection. Just like you do to "kill" a table, for instance.
--lhf