[Python-Dev] PEP 556: Threaded garbage collection
Antoine Pitrou
solipsis at pitrou.net
Fri Sep 8 13:08:39 EDT 2017
On Fri, 8 Sep 2017 10:03:33 -0700
Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 8 September 2017 at 08:05, Antoine Pitrou <solipsis at pitrou.net> wrote:
> >
> > Hello,
> >
> > I've written a PEP by which you can tell the GC to run in a dedicated
> > thread. The goal is to solve reentrancy issues with finalizers:
> > https://www.python.org/dev/peps/pep-0556/
>
> +1 from me for the general concept. (Minor naming idea: "inline" may
> be a clearer name for the current behaviour).
>
> One point that seems worth noting: even with cyclic GC moved out to a
> separate thread, __del__ methods and weakref callbacks triggered by a
> refcount going to zero will still be called inline in the current
> thread.
You're right, that bears mentioning. It's much less of a problem,
of course, since such calls happen at deterministic places.
Regards
Antoine.
More information about the Python-Dev
mailing list