gh-124218: Avoid refcount contention on builtins module (GH-125847)
This replaces `_PyEval_BuiltinsFromGlobals` with `_PyDict_LoadBuiltinsFromGlobals`, which returns a new reference instead of a borrowed reference. Internally, the new function uses per-thread reference counting when possible to avoid contention on the refcount fields on the builtins module.
S
Sam Gross committed
3c4a7fa6178d852ccb73527aaa2d0a5e93022e89
Parent: 5003ad5
Committed by GitHub <noreply@github.com>
on 10/24/2024, 4:44:38 PM