[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: setfenv(0,tbl) in Lua 5.1
- From: Dubiousjim <lists+lua@...>
- Date: Sat, 19 May 2012 22:45:15 -0400
On Sat, May 19, 2012 at 09:37:20PM -0500, Drake Wilson wrote:
> So in your example:
>
> ...
>
> ... they're not actually getting their environment directly from the
> original thread, but from the surrounding function, which got its
> environment from the file function, which got its environment from the
> main thread when it was created. Each of these happens at the time
> the inner or outer function expression or load call is evaluated,
> respectively. Note that the second thread environment is never
> examined at all.
Very helpful observation, thanks.
--
Jim Pryor
dubiousjim@gmail.com
- References:
- setfenv(0,tbl) in Lua 5.1, Dubiousjim
- Re: setfenv(0,tbl) in Lua 5.1, Dubiousjim
- Re: setfenv(0,tbl) in Lua 5.1, Drake Wilson
- Re: setfenv(0,tbl) in Lua 5.1, Dubiousjim
- Re: setfenv(0,tbl) in Lua 5.1, Drake Wilson