[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to add custom per-thread data in Lua 5.2?
- From: Wesley Smith <wesley.hoke@...>
- Date: Sat, 6 Mar 2010 10:35:49 -0800
stick it in a static std::map<lua_State *, MyAwesomeData *>. That's
the fastest I can think of.
On Fri, Mar 5, 2010 at 10:12 PM, Alexey Baskakov <firstname.lastname@example.org> wrote:
> Hello, lua.
> How to add custom per-thread data in Lua 5.2?
> The only message I have found on this topic is:
> 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:email@example.com