lua-users home
lua-l archive

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

On 2018-07-16, at 1:54 PM, Roberto Ierusalimschy <> wrote:

> However, a main issue of any "deterministic cleanup" in Lua is its
> interaction with coroutines. A coroutine can enter a block and never
> leave it.

Yeah, last time the proposal was, "Don't let that happen, and if you do, at least the garbage collector will get to it eventually."

Is there some stylized/restricted/wrapped way to use coroutines such that this doesn't happen, or is caught near the point of error? Like, if you always use something like nurseries for your coroutine needs, can the damage be limited? In that kind of model, direct use of _G.coroutine would be like use of _G.debug.