[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua and c interrupts (with lua callbacks)
- From: Ben Sunshine-Hill <sneftel@...>
- Date: Thu, 27 Oct 2005 00:41:14 -0700
On 10/27/05, Kaos <firstname.lastname@example.org> wrote:
> And when there's a interrupt, or a c callback gets called, it will also call
> a lua function (in the same lua_State) although the c process might be in the middle
> of one of it's periodic calls.
> My real question becomes: is this safe?
Not in the slightest. There is a way to politely interrupt Lua,
though. Check out the source code for the lua executable; its signal
handling mechanism is probably quite similar to what you want to do.