lua-users home
lua-l archive

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


Hi,

Ignacio Castaño wrote:
> 
> I'm using the old lua4.1-alpha. I create a initial thread, add some elements
> to the global table, and duplicate it. Then i add elements to the new
> threads, so they don't exist in the initial thread, right?

How do you create the new threads?  With lua_newthread?  Unless it's first
argument is NULL the new thread will share state (globals, objects, tag
methods, ...) with the lua_State you passed as the first argument.  Only
when you call lua_newthread will NULL you get an independent thread.

Ciao, ET.