Avoid nested SIGINT handling
Paulo da Silva
p_d_a_s_i_l_v_a_ns at nonetnoaddress.pt
Wed Nov 10 20:37:14 EST 2021
Às 21:55 de 10/11/21, Jon Ribbens escreveu:
> On 2021-11-10, Paulo da Silva <p_d_a_s_i_l_v_a_ns at nonetnoaddress.pt> wrote:
>> Hi!
>>
>> How do I handle a SIGINT (or any other signal) avoid nesting?
>
> I don't think you need to. Python will only call signal handlers in
> the main thread, so a handler can't be executed while another handler
> is running anyway.
>
Do you mean that if I issue a ctrl+c while the previous one is
"processing" it is held until, at least, the "processing" returns?
More information about the Python-list
mailing list