[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Can't interrupt tight loops in Lua 5.4 anymore?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 18 May 2020 11:58:26 -0300
> Roberto> In all versions of Lua there are several cases where a signal
> Roberto> will not interrupt a script (e.g., a loop inside a C function
> Roberto> or a coroutine or a protected call).
>
> That's not really the question. The question is whether it is possible
> to make a loop _in pure lua code_ that does not ever call a hook
> function. (What happens to an error that that function might generate is
> a separate question.)
>
> If that's true, it would be a serious problem, no?
I don't see any mention to _in pure lua code_ in the original message,
so I assume that what you are calling "the question" is a new question
you want to ask, not the one which was asked.
Signals are hard to handle in ISO C. ISO C gives very little guarantees
and mechanisms to handle them. Likewise, Lua never gave any guarantees
about its handling of signals, and Lua 5.4 follows this pattern. Like
with 'errno', improvements are welcome, but don't expect any reliable
guarantees about signal handling.
-- Roberto
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org