emacs-devel
[Top][All Lists]
Advanced

[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: Fri, 07 Jul 2023 20:05:53 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> But how exactly does, say, relocating buffer text can break things? May
>> you provide a pseudo-code example?
>
> ...  If you
> consider allowing relocation when the buffer is locked, then some of
> the threads will be surprised when they try to resume accessing the
> buffer text.

Can you please provide an example about "surprised"? Do you mean that
buffer->pt will no longer be accurate? Something else?

>> Then the question is: can the global state be reduced?
>
> By what measures?  Please suggest something concrete here.

By transforming some of the global state variables into thread-local
variables.

>> May it be acceptable to have a limited concurrency where async threads
>> are only allowed to modify a portion of the global state?
>
> I don't see how one can write a useful Lisp program with such
> restrictions.

Pure, side-effect-free functions, for example.

-- 
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]