[Top][All Lists]

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

Re: User interaction from multiple threads

From: Michael Albinus
Subject: Re: User interaction from multiple threads
Date: Fri, 17 Aug 2018 10:11:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Elias Mårtenson <address@hidden> writes:

> Hi Michael,

Hi Elias,

>     Well, we aren't in disagreement. I spoke about the case of "C-x &
>     C-x C-f .../emacs/lisp/*.el". This opens 250 buffers, all in the
>     same frame.
> But that happens without threading as well. Or did you mean “all in
> their own frames”? That would indeed be terrible.

Sure, this happens also w/o threads. The problem comes, when some of the
visited files need user input while loading into the buffer. W/o
threads, this happens one after the other. With threads, such user input
requests from different buffers could be mixed, which is a problem.

See <https://debbugs.gnu.org/32426>, where I have described such a scenario.

> Since I'm already posting to the list, I just want to raise a point
> that I have been thinking about as I have been reading this
> discussion. Personally, I don't see why most (any?) commands needs C-x
> &. Most of the time, the user wouldn't know that a certain operation
> is going to take time and therefore needs C-x &. Someone else
> mentioned on this list that a better solution would be to simply open
> a new buffer, but letting its contents say “loading…” if it takes too
> long. The same could be the case for things like Gnus or any other
> long-running command.
> Killing the buffer would kill the process, in case it's hung.
> Perhaps I didn't understand the issues that were raised in this
> thread, but it wasn't clear to me why C-x & would ever be needed (or
> rather, why its absence would ever be needed).

Your proposal means that we always visit files asynchronously. Do we
want this unconditionally?

Of course you could configure Emacs for a similar behavior in your own
stanza. Set execute-file-commands-asynchronously to t (in the
feature/tramp-thread-safe branch):

--8<---------------cut here---------------start------------->8---
Non-nil means visit file asynchronously when called interactively.
If it is a regular expression, it must match the file name to be
visited.  This behavior is toggled by C-x &
prior the command invocation.
--8<---------------cut here---------------end--------------->8---

> Regards,
> Elias

Best regards, Michael.

reply via email to

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