lua-users home
lua-l archive

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


Edgar Toernig wrote:
> > Doesn't that mean that at the beginning the global tables are equal (but
not
> > the same) and that i can add a key to one table without seen it in the
> > other?
>
> No.  A misunderstanding.  They both use the same table.  If you change its
> contents in one thread the change is visible in all other threads that use
> this table.  But you can call lua_setglobals to select another table that
> shall used for globals.
>
> I guess it will be rephrased to something like: "Each thread may have an
> independent table for global variables. When you create a thread it uses
> the same table as is used in the given state, but you can select a
> different one later via lua_setglobals."

thanks for the explanation, it's clear now.


Ignacio Castaño
castano@asidesoft.com



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com