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: Mon, 17 Jul 2023 18:08:19 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:

> GCALIGNED_UNION_MEMBER

Its purpose is to ensure that Lisp structures are aligned sufficiently
for mark_memory to locate its members when they are placed on the stack,
through the optional AUTO_CONS or AUTO_STRING mechanism.

> What I mean is a situation when we try to read sym->u.s.val.value, but
> the value becomes Lisp_Object value[].
>
> Then, realloc calls in other thread may create a race condition when
> accessing array element may point to obsolete memory address that was
> only valid prior to realloc.

My implementation used a lock around a linked list of value and function
cells, only taken if the thread sees that the list is not empty.


reply via email to

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