emacs-devel
[Top][All Lists]
Advanced

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

Re: Introducing thread-safe Tramp


From: Michael Albinus
Subject: Re: Introducing thread-safe Tramp
Date: Wed, 25 Jul 2018 19:53:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> > I believe we'd rather go into locking the minibuffer / echo area while
>> > reading.
>> 
>> What do you mean by "locking" in this context?  Ask a thread to take a
>> mutex before it can use the minibuffer?

Yes, I believe that's what we shall do when input is read from the
minibuffer. There shall be one common minibuffer mutex, and it is locked
when input has to be dealt from the minibuffer. Something like the
appended patch, but it doesn't work yet. Likely, due to the messages
arriving the echo area in parallel.

> For the messages part, how about if we create a buffer named
> *Messages-for-threadHHHHH*, where HHHHH is the thread ID, and put the
> echo-area messages from that thread in that buffer?  We could later
> invent a machinery to display that buffer automatically when some
> event happens, like when the thread exits?
>
> We could do something similar with echo-area buffers: create
> additional buffers when threads are created.
>
> WDYT?

Could work. In general, I don't believe it is a problem when messages
arrive the echo area from different threads in parallel. The problem is
when they disturb input reading. While input is taken, messages must be
blocked writing to the minibuffer being their echo area. With the
proposal you have done, or looking for the mutex, or something else.

Best regards, Michael.

Attachment: txtfegRHarZuH.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]