[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: use of invalid L in libevent wrapper from Lua Programming Gems
- From: Wim Couwenberg <wim.couwenberg@...>
- Date: Sun, 20 Dec 2009 13:34:15 +0100
> This patch uses static globals, so isn't thread safe, but since the
> libevent event_dispatch() API isn't thread-safe either, that shouldn't
> be a problem.
Instead of a static global you could store the dispatching state in a
(not light) userdata in the registry. Then it is accessible form all
Lua states (where events are created) and its address is fixed.