[Top][All Lists]

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

Re: Emacs design and architecture. How about copy-on-write?

From: Dmitry Gutov
Subject: Re: Emacs design and architecture. How about copy-on-write?
Date: Sat, 23 Sep 2023 17:25:21 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 23/09/2023 17:23, Yuri Khan wrote:
On Sat, 23 Sept 2023 at 20:09, Dmitry Gutov<dmitry@gutov.dev>  wrote:

I agree: functions like yes-or-no-p will have to, internally in their
implementation, acquire the "redisplay lock" or whatever it'll be
called, and do other things to ensure that they work from non-default
threads too.
That’s not the only possible implementation. A function that wants a
confirmation could package up the prompt with a continuation function,
and post that as a message to the main thread. The main thread would
pump its message queue, display the prompt, and schedule the
continuation (with the prompt result) to a worker thread.

That would require the code using prompt functions to be transformed
to continuation-passing style though, either explicitly in code, or
automatically by the lisp reader.

Yes, that's the other option which would make a lot of code require changes to be usable in threaded environment. As I understand, people would like to avoid that.

reply via email to

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