mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
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.
This commit is contained in:
parent
206de4155b
commit
3ea488aac4
11 changed files with 126 additions and 83 deletions
|
@ -28,7 +28,7 @@
|
|||
#include "pycore_sliceobject.h" // _PySlice_Fini()
|
||||
#include "pycore_sysmodule.h" // _PySys_ClearAuditHooks()
|
||||
#include "pycore_traceback.h" // _Py_DumpTracebackThreads()
|
||||
#include "pycore_uniqueid.h" // _PyType_FinalizeIdPool()
|
||||
#include "pycore_uniqueid.h" // _PyObject_FinalizeUniqueIdPool()
|
||||
#include "pycore_typeobject.h" // _PyTypes_InitTypes()
|
||||
#include "pycore_typevarobject.h" // _Py_clear_generic_types()
|
||||
#include "pycore_unicodeobject.h" // _PyUnicode_InitTypes()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue