]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-117783: Immortalize objects that use deferred reference counting (#118112)
authorSam Gross <colesbury@gmail.com>
Mon, 29 Apr 2024 18:36:02 +0000 (14:36 -0400)
committerGitHub <noreply@github.com>
Mon, 29 Apr 2024 18:36:02 +0000 (14:36 -0400)
commit7ccacb220d99662b626c8bc63b00a27eaf604f0c
tree231cb901ee62e523be237392b0f2b966aa8be128
parent8d4b756fd31d4d91b55105b1241561e92cc571a3
gh-117783: Immortalize objects that use deferred reference counting (#118112)

Deferred reference counting is not fully implemented yet. As a temporary
measure, we immortalize objects that would use deferred reference
counting to avoid multi-threaded scaling bottlenecks.

This is only performed in the free-threaded build once the first
non-main thread is started. Additionally, some tests, including refleak
tests, suppress this behavior.
13 files changed:
Include/internal/pycore_gc.h
Lib/concurrent/futures/process.py
Lib/test/libregrtest/main.py
Lib/test/libregrtest/single.py
Lib/test/support/__init__.py
Lib/test/test_capi/test_watchers.py
Lib/test/test_code.py
Lib/test/test_functools.py
Lib/test/test_weakref.py
Modules/_testinternalcapi.c
Objects/object.c
Python/gc_free_threading.c
Python/pystate.c