[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Interrupt safe?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 26 Aug 2003 23:59:56 -0300
>What parts, if any, of lua are safe to execute at interrupt time? Such as
>in a I/O or audio completion OS routine?
If you mean, can you call Lua inside a signal handler, then the answer is
that the safe way is to do like lua.c does: in the signal handler, just set a
special hook. When hook is be called, you can interact safely with Lua.
The same technique is used in my alarm library.
--lhf