lua-users home
lua-l archive

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


On Fri, Oct 13, 2006 at 06:37:54PM -0500, Rici Lake wrote:
> Using lua_sethook() from a different OS thread to change the hook 
> settings of a running lua_State would count as simultaneously accessing 
> the same lua_State from two different OS threads, and thus fall into 
> the category of "some synchronization mechanism is required which is 
> not provided by Lua."

As far as I can tell, it is impossible to implement this outside of the
Lua core (without exposing something).  If one thread is stuck on a
long-running lua_call(), I can't wait for lua_call to return before
interrupting it with a hook from my timeout thread.

> be an approrpriate mechanism. If I were to suggest anything to you, 
> which would probably be pointless, it would be to use separate mutexes 

(I have no idea where this snipe came from.)

-- 
Glenn Maynard