lua-users home
lua-l archive

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


On Jan 10, 2010, at 5:56 AM, Cosmin Apreutesei wrote:

> How about a built-in function ecall(env,f,...) ? And of course,
> ecall() would NOT be implemented via setfenv(), so you could still
> call f() properly from another thread while inside ecall().

See my recent posting. This takes a change in the runtime to store environments in call frames. On the other hand, for precisely these sort of reasons, I think it would be a good change. As it is, setfenv is not friendly toward threaded (i.e., coroutine) code or other reentrant cases.

Mark