lua-users home
lua-l archive

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


> This seems like a rather narrow and dismissive attitude for a system
> that goes to such lengths to be portable.  Portability means working
> on architectures with a different set of warts than x86.
> 
> "lua_sethook can be called from a thread or signal handler" notion
> should be qualified. [...]

lua_sethook has no intention of being "thread safe".  As already pointed
out in this discussion, multithreading is a can of worms that opens
the door to hell. It is quite difficult to write correct code with
multithreading, and it is mostly impossible to argue that the code is
correct (although, of course, it can be easy to argue that it is wrong).

However, lua_sethook has a clear intention of being "signal safe". If
it is not, we would like to correct it.

-- Roberto