lua-users home
lua-l archive

Re: Popularity contest

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


On Tue, Sep 27, 2011 at 11:08:45AM +0200, steve donovan wrote:
> On Mon, Sep 26, 2011 at 9:06 AM, steve donovan
> <steve.j.donovan@gmail.com> wrote:
> > local f = open_connection()
> > finalize(function(e)
> >   f:close()
> > end)
> 
> Any feelings/opinions about finalizers? My feeling is that it could be
> done fairly efficiently, although of course the devil is in the
> details: the guiding principle is "don't pay for what you don't use".
> 
Suppose we had coroutine.kill(), would that be enough to implement
whatever the finalizer is needed for?
Dirk

AltStyle によって変換されたページ (->オリジナル) /