[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: Ihor Radchenko
Subject: Re: Emacs design and architecture. How about copy-on-write?
Date: Tue, 19 Sep 2023 12:37:19 +0000

Emanuel Berg <incal@dataswamp.org> writes:

>> So the problem is not how to lock and serialize access to
>> a variable in general, the problem is how to do this in
>> Emacs so that we won't need to lock everything.
> Okay, excellent, but then why isn't it enough to just maintain
> a register of global variables and threads?

> If a thread wants to use it, look in the register, is it
> available? If not, get in line. And when it becomes available,
> pop a thread in the line, if there is one, and start over?
> Why do we have to lock everything just because we lock
> a single variable?

Because implementation details are tricky - a lot of Elisp internal
machinery is relying upon modifying global symbol objects, having
certain global C variables assigned to the "right" value, and buffer
objects having the right buffer-local values.
This particular issue has been discussed in details in

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]