Subject: Re: bug#32502: 27.0.50; Tramp; C-g during asynchronous remote find-file kills Emacs

From: Michael Albinus <[email-masked]>
Date: Thu, 30 Aug 2018 21:30:35 +0200

Eli Zaretskii <[email-masked]> writes:

>> +If @var{thread} is the main thread, the signal is not propagated
>> +there.  Instead, it is shown as message in the main thread.
>
> Maybe I'm missing something, but where's the code which shows this
> message?

thread-handle-event of thread.el.

>> @@ -863,7 +863,8 @@ DEFUN ("thread-signal", Fthread_signal, Sthread_signal, 3, 3, 0,
>>  This acts like `signal', but arranges for the signal to be raised
>>  in THREAD.  If THREAD is the current thread, acts just like `signal'.
>>  This will interrupt a blocked call to `mutex-lock', `condition-wait',
>> -or `thread-join' in the target thread.  */)
>> +or `thread-join' in the target thread.
>> +Signals to the main thread are ignored quietly.  */)
>    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> That's not really accurate, is it?

Oh, this is from my first attempt. Fixed.

I've committed this to the master. Let's see how it goes.

Gemini, I've stolen the frame of your thread.el from the
scratch/list-threads branch. You will merge your code there, I guess.

I'm a little bit undecided, whether thread events shall be restricted to
signaling the main thread with error messages. Could be used for other
purposes as well. Let's see.

Best regards, Michael.