[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua registry, environment, and threads.
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 12 Jan 2010 15:15:06 +0200
On Tue, Jan 12, 2010 at 2:07 PM, Tony Finch <dot@dotat.at> wrote:
> If there were hooks on the environment of 5.2 "in" blocks so that the code
> knows when the block is finished, you could perhaps write something like
>
> do a=1
> in dynamic{ a=2 } do
> g() -- access to a gives 2
> end
> -- a == 1
> end
Yes, assuming that g is local, of course.
Having a lexical-block-finished hook would be a powerful tool indeed,
for RAII-style cleanup etc.
steve d.
- References:
- Re: Lua registry, environment, and threads., Christian Tellefsen
- Re: Lua registry, environment, and threads., Leo Razoumov
- Re: Lua registry, environment, and threads., Petite Abeille
- Re: Lua registry, environment, and threads., Paul Moore
- Re: Lua registry, environment, and threads., Petite Abeille
- Re: Lua registry, environment, and threads., Juris Kalnins
- Re: Lua registry, environment, and threads., Sean Conner
- Re: Lua registry, environment, and threads., Juris Kalnins
- Re: Lua registry, environment, and threads., Juris Kalnins
- Re: Lua registry, environment, and threads., Tony Finch