summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-10-15 19:06:41 (GMT)
committerGitHub <noreply@github.com>2024-10-15 19:06:41 (GMT)
commit3ea488aac44887a7cdb30be69580c81a0ca6afe2 (patch)
tree925b843905d373016f38c08431a7658fd10db081 /Python/pystate.c
parent206de4155b01f6285c5551d2224391fa1fa0ac14 (diff)
downloadcpython-3ea488aac44887a7cdb30be69580c81a0ca6afe2.zip
cpython-3ea488aac44887a7cdb30be69580c81a0ca6afe2.tar.gz
cpython-3ea488aac44887a7cdb30be69580c81a0ca6afe2.tar.bz2
gh-124218: Use per-thread refcounts for code objects (#125216)
Use per-thread refcounting for the reference from function objects to their corresponding code object. This can be a source of contention when frequently creating nested functions. Deferred refcounting alone isn't a great fit here because these references are on the heap and may be modified by other libraries.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 5d94b77..e3812cb 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -20,7 +20,7 @@
#include "pycore_runtime_init.h" // _PyRuntimeState_INIT
#include "pycore_sysmodule.h" // _PySys_Audit()
#include "pycore_obmalloc.h" // _PyMem_obmalloc_state_on_heap()
-#include "pycore_uniqueid.h" // _PyType_FinalizeThreadLocalRefcounts()
+#include "pycore_uniqueid.h" // _PyObject_FinalizePerThreadRefcounts()
/* --------------------------------------------------------------------------
CAUTION