emacs-devel
[Top][All Lists]
Advanced

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

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


From: Eli Zaretskii
Subject: Re: Emacs design and architecture. How about copy-on-write?
Date: Fri, 22 Sep 2023 19:14:53 +0300

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: Emanuel Berg <incal@dataswamp.org>, emacs-devel@gnu.org
> Date: Fri, 22 Sep 2023 16:11:38 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > So one thread uses setq, releases the lock, then another thread comes,
> > takes the lock and changes the value of that variable, and when the
> > first thread uses the variable after that, it will have a value
> > different from the one the thread used in its setq?  How can one write
> > a program under these conditions and know what it will do?
> 
> IMHO, there should be a new API to lock global variables by async
> threads and/or set them.

Which again means existing Lisp programs will be unable to run without
very serious changes.

> 1. Thread does not rely upon global variable value being constant, only
>    upon being able to set it.

This is an almost empty set in Emacs.

> 2. Thread sets global variable value and uses it later, expecting the
>    value to remain constant.

This is the problem to solve.

> 3. Thread let-binds global variable.

This is already solved in the current Lisp threadfs.



reply via email to

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