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: Thu, 06 Jul 2023 13:13:07 +0000

Po Lu <luangruo@yahoo.com> writes:

>>>>    LOCK_OBJECT (foo);
>>>>    LOCK_OBJECT (XCAR (foo));
>>> ...
>> ...
>> Do you mean that locking XCAR (foo) is unnecessary when foo is locked?
>
> No, that there is no need to lock a cons (or a vector, or anything else
> with a fixed number of Lisp_Object slots) before reading or writing to
> it.

I feel confused here.

My understanding is

  CHECK_STRING (XCAR (foo));
  <we do not want XCAR (foo) to be altered here>
  foo = XSTRING (XCAR (foo));

So, locking is needed to ensure that CHECK_STRING assertion remains valid.

Or did you refer to something else?

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