unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: sbaugh@janestreet.com, emacs-devel@gnu.org
Subject: Re: A UI approach for making synchronous commands asynchronous
Date: Tue, 01 Aug 2023 20:11:25 +0300	[thread overview]
Message-ID: <83bkfq1yde.fsf@gnu.org> (raw)
In-Reply-To: <m2y1iuso07.fsf@gmail.com> (message from Helmut Eller on Tue, 01 Aug 2023 18:53:12 +0200)

> From: Helmut Eller <eller.helmut@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Tue, 01 Aug 2023 18:53:12 +0200
> 
> I was wondering what would happen if Emacs would adopt a
> one-thread-per-command strategy, i.e. every command starts out in a new
> background thread.

Based on past discussions, some of the problems with this are:

  . how to handle user interaction from such "background" commands
    (e.g., many commands ask the user for confirmation or prompt the
    user for input of some other kind, like file names)
  . how to trigger redisplay (and remember that some features, like
    messages in echo-area, are actually calls to redisplay in
    disguise)
  . how to handle timers started by some thread
  . how to handle output from subprocesses (a subprocess is by default
    locked to the thread which started it, but interesting stuff
    happens if that thread exits or dies)

But we definitely need to try to use threads more than we do, because
if not, we will never acquire solutions to these problems.



      reply	other threads:[~2023-08-01 17:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 19:07 A UI approach for making synchronous commands asynchronous Spencer Baugh
2023-07-27  5:58 ` Eli Zaretskii
2023-07-27 14:22   ` Spencer Baugh
2023-07-27 15:09     ` Eli Zaretskii
2023-07-27 15:32       ` Spencer Baugh
2023-07-27 17:31         ` Eli Zaretskii
2023-07-27 18:22           ` Spencer Baugh
2023-07-27 19:32             ` Eli Zaretskii
2023-07-28  4:32               ` tomas
2023-07-28  6:21                 ` Eli Zaretskii
2023-08-01 14:09 ` Spencer Baugh
2023-08-01 16:53   ` Helmut Eller
2023-08-01 17:11     ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bkfq1yde.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=sbaugh@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).