lua-users home
lua-l archive

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


Hello, lua.

How to add custom per-thread data in Lua 5.2?

The only message I have found on this topic is:
http://lua-users.org/lists/lua-l/2010-01/msg00165.html

Yes, I can setup a hash or put key/value pairs in the Registry.

But I need it to be very _fast_.

So, we have no per-thread fenv, no GLOBALS pseudo-index and
lua_replace trick for thread globals.

I would prefer to have something like light user-data which can be
obtained from lua state pointer.

-- 
With best regards,
 Alexey                          mailto:loyso@loyso.m6.net