emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPS make-thread


From: Eli Zaretskii
Subject: Re: MPS make-thread
Date: Sun, 23 Jun 2024 11:53:14 +0300

> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: yantar92@posteo.net,  eller.helmut@gmail.com,  emacs-devel@gnu.org
> Date: Sun, 23 Jun 2024 08:45:44 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Is it safe to call igc--collect from a non-main Lisp thread?  I don't
> > understand well the semantics and the intent of what igc_collect does,
> > so I cannot myself try to reason about this.  Maybe what we do there
> > is not safe when invoked from another Lisp thread?  Do all our threads
> > share the same arena, for example?  If so, what happens when a Lisp
> > thread is waiting for the global lock and another Lisp thread calls
> > igc--collect?
> 
> igc_collect calls mps_arena_collect which acquires the MPS lock, does a
> full collection, and leaves the arena in parked state, so that the
> caller has to mps_release it itself, which we do in igc_collect. This is
> explicitly only intended for debugging purposes. It is thread-safe.

Then why did we get the MPS assertion about warm and cold in this case?



reply via email to

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