lua-users home
lua-l archive

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


--- In lua-l@yahoogroups.com, Luiz Henrique de Figueiredo <lhf@t...> 
wrote:
> 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.

In my application, threads are handled entirely through C code, not 
Lua. I use the C functions, lua_newthread() and lua_resume(), to 
create and resume threads, rather than the Lua methods, 
coroutine.create and coroutine.resume. Assuming that threads are 
never referenced explicitly in my Lua code, what do I need to do on 
the C side of things to ensure that all references to a thread are 
gone?