lua-users home
lua-l archive

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

How would I go about creating a per-thread immutable table which is a
different C object for each thread? Do I add it to the globals for each
thread? Or, do I create an upvalue? in the thread? But, is it possible
to make an upvalue immutable?

Actually, to be more precise I want to create a sandbox for code which
runs in it's own thread (possibly creating more threads though not
necessary), and which has access to immutable C objects--so that Lua
code can't remove the object, which is necessary for underlying C code
to know the context of the thread.

Also, is the registry global across all threads created from the same
original Lua context?



William Ahern <>