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: Po Lu
Subject: Re: Concurrency via isolated process/thread
Date: Thu, 06 Jul 2023 20:41:43 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:

> I am thinking about some kind of extra flag that will mark an object
> locked:
>
>    LOCK_OBJECT (foo);
>    LOCK_OBJECT (XCAR (foo));
>    CHECK_STRING (XCAR (foo));
>    foo = XSTRING (XCAR (foo));
>    UNLOCK_OBJECT (XCAR (foo));
>    UNLOCK_OBJECT (foo);
>
> LOCK_OBJECT will block until the object is available for use.

This is unnecessary.  Loads and stores of Lisp_Object values are cache
coherent except on 32 bit systems --with-wide-int.  XCAR (foo) will
always load one of the values previously written.


reply via email to

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