lua-users home
lua-l archive

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


On 10/27/05, Kaos <kaos@explosive.se> 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.

Ben