lua-users home
lua-l archive

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


Rici Lake wrote:

When the last reference to the thread (coroutine) disappears, the garbage collector will take care of it.

By the way, threads are left in a graceful state by yield. (Almost) nothing needs to be done to them aside from freeing the storage they occupy (their stack and their callinfo stack).

IMHO the original question was about killing coroutine running in one thread from another. Then correct answer will be "Original Lua distribution is not thread safe. And without modifications root lua_State can be accessed only inside one thread."

AMDG,
 Antero Vipunen.