lua-users home
lua-l archive

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


Am 23.06.2015 um 21:02 schröbte Soni L.:

I only want to move

struct Table *mt[LUA_NUMTAGS];  /* metatables for basic types */

That seems like a bad idea: a value that is accessed via multiple coroutines (or passed via resume/yield, or in a function that is called from multiple coroutines) would get/loose its metatable depending on where it is used.


and

TValue l_registry;

out of the global_State and into the lua_State.

And then `io.open` wouldn't find its metatable when called from within a coroutine, C libraries would be loaded and gc'd multiple times, etc. ...


Philipp