lua-users home
lua-l archive

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

> 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.