[Top][All Lists]

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

Re: Concurrency via isolated process/thread

From: Ihor Radchenko
Subject: Re: Concurrency via isolated process/thread
Date: Sat, 08 Jul 2023 12:01:00 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> > That is already a problem, as long as we are talking about leaving
>> > most of Emacs application code intact.  How do you ensure only the
>> > main thread can process input and display?  A non-main thread can
>> > easily call some function which prompts the user, e.g., with
>> > yes-or-no-p, or force redisplay with sit-for, and what do you do when
>> > that happens?
>> To signal an error.
> Great! that means in practice no existing Lisp program could ever run
> in a non-main thread.  It isn't a very practical solution.
> Besides, non-main threads do sometimes legitimately need to prompt
> the user.  It is not a programmer's error when they do.

As an alternative async threads can be temporarily changed to
cooperative in such scenario.

They will already have to wait synchronously when consing new objects

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

reply via email to

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