lua-users home
lua-l archive

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

* steve donovan:

>> If you have got an event loop, you can run them from the event loop
>> with very little risk.
> Non-trivial applications usually have one, so that's cool, but what
> kind of finalization mechanism could exploit this reliably?

This is probably my fault because I waited too long for replying.  If
you go back to the original message, finalization in this way happens
only if a coroutine which has pending destructors (scope exit
handlers) becomes unreferenced.  I expect this happen only in odd
cases (some execution is abandoned because an error occurred, or
someone poked around with a debugger).  It's just a safety net,
similar to finalization in Java, where correct code should always use
try-finally blocks.