lua-users home
lua-l archive

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


On Mon, Jun 8, 2009 at 11:31 PM, Martin, Marcus<mamartin@ea.com> wrote:
> Each Lua interpreter is completely independent of every other
> interpreter. I could have as many as I want (memory permitting).
Yes, every Lua universe created by lua_newstate is completely
independent from every other Lua universe. There is no global
interpreter lock.

> Each Lua thread shares global state with all other threads in the
> creating interpreter unless I do something to prevent that.
A Lua thread created with lua_newthread will inherit the globals table
and registry table of the creating thread, but either of these can be
replaced by new, empty tables if required.