lua-users home
lua-l archive

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


> I'm running threaded code and have defined the lua_Lock functions.  Each
> thread has it's own lua_State created via lua_open and there is one global
> lock that they all use for synchronization

If each thread has its own separate Lua state, why do you need synchronization?
In your case, you don't need to define lua_lock and friends.
You only need synchronization if you're running *child* states in the threads.
Or am I missing something?
--lhf