Lua registry: it is shared by threads? -
lua provides "registry" "that can used c code store whatever lua values needs store". , threads "shares original thread global environment", said here. can not find place says if shares register.
so that's question: if threads derived same original state, share table accessible @ lua_registryindex?
the lua registry part of lua_state*, using or contained within given lua_state (such lua threads: co-routines) share registry.
lua threads (co-routines) part of lua_state* created from, , share same registry.
os threads access whatever registry associated lua_state* passed lua_getfield(...) (et al.).
bare in mind lua's assurance respect os threading lua capi reentrant , stores values in lua_state*; manage state avoid simultaneous access , corruption.
Comments
Post a Comment