[Top][All Lists]

[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 16:17:02 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> This does not change my understanding.
>> Locking should prevent manipulations with object data over the time span
>> the code expects the object to be unchanged.
> That could defeat GC, should Emacs decide to run it while the lock is
> in place.

May you elaborate?

>From my understanding, GC is now called in specific places in subr code.
If we consider scenario when multiple Emacs threads are running and one
is requesting GC, it should be acceptable to delay that request and wait
until all other threads eventually arrive to GC call. Once that is done,
GC is safe to run.

Of course, GC calls must not be done while Object lock is in place. But
that's not too different from the existing requirement for GC calls -
they are not sprinkled in arbitrary places.

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]