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 14:34:05 +0200

Michael Albinus <[email-masked]> writes:

> Instead of a timer, the asynchronous find-file could check for errors of
> the finished thread(s). A good point might be, when thread-join delivers
> the result(s).
>
> It was said earlier already (I believe), but I repeat it: thread-join
> should not only return the result, but should also propagate signals the
> thread has been trapped. It would be the responsibility of the calling
> code to ignore this information, or to propagate.

I stay corrected: thread-join propagates also errors to the calling thread.
I've modified Tramp not to propagate errors to the main thread. In
find-file-noselect, thread-join is wrapped now by with-demoted-errors.

Pushed to the feature/tramp-thread-safe branch. Gemini, could you pls
check whether this works for you as expected?

Best regards, Michael.