lua-users home
lua-l archive

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


Hello all,

I'm wondering if it is possible to share a 'global' lua table created in
C++ between two running Lua interpreter instances.

Both Lua interpreters are called alternately from C++ and execute the
same Lua script. A race condition while accessing the global table won't
happens.

I know how to create a table in C++ and pass it to the Lua interpreter.
But I'm unsure if Lua internally just hold it's own copy of the table
and therefore both interpreters access two different tables.
What I need is a single table to exchange informations between both
running interpreters.

Any hints or suggestions?

Thanks a lot

Joachim