[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
anyway.
--
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>
- Re: Concurrency via isolated process/thread, (continued)
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/09
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/09
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/09
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/09
- Re: Concurrency via isolated process/thread, Dmitry Gutov, 2023/07/10
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/09
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/09
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/09
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/09
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/09
- Re: Concurrency via isolated process/thread,
Ihor Radchenko <=
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/08
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/07
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/07
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/07
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/05
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/06
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/06
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/06