diff options
author | Sam Gross <colesbury@gmail.com> | 2024-10-15 19:06:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-15 19:06:41 (GMT) |
commit | 3ea488aac44887a7cdb30be69580c81a0ca6afe2 (patch) | |
tree | 925b843905d373016f38c08431a7658fd10db081 /Python/pystate.c | |
parent | 206de4155b01f6285c5551d2224391fa1fa0ac14 (diff) | |
download | cpython-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.c | 2 |
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 |