[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: thread safety of lua
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 28 Apr 2005 06:57:37 -0300
> is lua thread-safe, ie, whether i can guarantedly
> "safely" use two different contexts of luavm in two
> separate threads of same program.
Two Lua states created with lua_open are completely independent and can
be used in separate OS threads of same program. Child states created
with lua_newthread cannot be used in separate OS threads unless you
compile Lua with support for that, by defining lua_lock and lua_unlock
adequately for your locking needs.