summaryrefslogtreecommitdiffstats
path: root/Python/uniqueid.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-128923: Use zero to indicate unassigned unique id (#128925)Sam Gross2025-01-171-13/+16
| | | | | | | | In the free threading build, the per thread reference counting uses a unique id for some objects to index into the local reference count table. Use 0 instead of -1 to indicate that the id is not assigned. This avoids bugs where zero-initialized heap type objects look like they have a unique id assigned.
* gh-124218: Use per-thread reference counting for globals and builtins (#125713)Sam Gross2024-10-211-3/+9
| | | | Use per-thread refcounting for the reference from function objects to the globals and builtins dictionaries.
* gh-124218: Use per-thread refcounts for code objects (#125216)Sam Gross2024-10-151-24/+43
| | | | | | | 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.
* gh-124218: Refactor per-thread reference counting (#124844)Sam Gross2024-10-011-0/+204
Currently, we only use per-thread reference counting for heap type objects and the naming reflects that. We will extend it to a few additional types in an upcoming change to avoid scaling bottlenecks when creating nested functions. Rename some of the files and functions in preparation for this change.