lua-users home
lua-l archive

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


From: "Roberto Ierusalimschy" <roberto@inf.puc-rio.br>
> > First, the Lua 4.1 LUA_USERSTATE #define to allow inclusion of state
> > code into the lua_State structure in lstate.h was not sufficient to
> > bring this online.  No code needs to be added to the lua_State.  The
> > code to support "proper" multithreading (through this technique anyway)
> > has to be in global_State.
>
> I have implemented something along your suggestions using the current
> macros. Instead of putting the "lock" stuff in global_State, I created
> a new structure for them, and set LUA_USERSTATE to be a pointer to this
> structure. When I create the state (with lua_open), I allocate this
> structure:

Hi, Roberto,

Before I respond to this, I would like to see your full implementation of
threads along the lines of what I posted.  After I see it, my initial
reaction to this message may be invalid (which is that it looks like more of
a management nightmare... but like I said, I want to see the code first).

Thanks,
Josh