lua-users home
lua-l archive

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


On 2/2/06, Rici Lake <lua@ricilake.net> wrote:

<snip>
On the other hand, there is nothing stopping you from creating a
binding to an arbitrary shared structure, which the various threads
could access through a userdata. That structure would need its own
lock, of course. You could make that look really a lot like the
userdata were a native table. So that way you could run multiple Lua
universes without the lua_lock() mechanism, as long as you ensured that
each Lua universe was only active in one thread (at a time).


Thanks, good information there!  Yes, I think the userdata shared resource is what I need.  Not quite what I wanted but only because I was thinking you could access running states from another thread.  I think I now understand that the internal lua_lock() is not used for that purpose.

--
// Chris