[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: state of the Lua nation on resource cleanup
- From: Florian Weimer <fw@...>
- Date: Sun, 15 Feb 2009 14:22:57 +0100
* 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).