[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>
- Re: Concurrency via isolated process/thread, (continued)
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/05
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/05
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/05
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/05
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/06
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/06
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/06
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/06
- Re: Concurrency via isolated process/thread,
Ihor Radchenko <=
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/06
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/06
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/07
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/07
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/07
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/07
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/07