lua-users home
lua-l archive

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


Ken Rawlings wrote:
>   * Can multiple instances of the Lua interpreter be used inside one
>     process? The presence of one lua_state("L") shared globally is
>     worrisome -- can it be shared by multiple interpreters?

I have changed Lua so I'm passing the state as a parameter all around
the system, in that way I have one state pr. thread, it works very well.
You also have the option of using LTS (Local thread storage), but my
tests showed that that was slower - and you did'nt have 100% control
(Like addressing the state from another thread etc..)

Erik