lua-users home
lua-l archive

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


One answer for coroutines in the scope manager pattern is that one needs not just on_exit and on_failure, but also the pair on_yield/ on_resume.

One could also treat coroutine death as being signaled with an exception before the coroutine actually goes away. Or more generally a coroutine with outstanding finalizers is itself a finalizable object either via an exception thrown from the yield or simply by running the finalizers.

Do upvalues get processed when a coroutine gets collected?

Mark