lua-users home
lua-l archive

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


* Roberto Ierusalimschy:

> Well, one thing needs to be clear: any solution not based on garbage
> collection will not be correct in all cases. More specifically, the
> situation where a coroutine yields while using a resource and later
> becomes garbage (and therefore will never "finish" its use) can
> only be detected through garbage collection.

Based on what other languages do, I think you need both mechanisms:
something to do cleanups on scope exit, and something to deal with
exceptional cases (which would also include a user poking around with
a debugger).