aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/gc_free_threading.c
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2025-03-26 12:08:20 -0400
committerGitHub <noreply@github.com>2025-03-26 12:08:20 -0400
commit3d4ac1a2c2b610f35a9e164878d67185e4a3546f (patch)
tree3f5c5a1347accef950ebfce5d7204864daaf0b41 /Python/gc_free_threading.c
parent1b8bb1ed0c4243796af531a35de982bc4f028215 (diff)
downloadcpython-3d4ac1a2c2b610f35a9e164878d67185e4a3546f.tar.gz
cpython-3d4ac1a2c2b610f35a9e164878d67185e4a3546f.zip
gh-123358: Use `_PyStackRef` in `LOAD_DEREF` (gh-130064)
Concurrent accesses from multiple threads to the same `cell` object did not scale well in the free-threaded build. Use `_PyStackRef` and optimistically avoid locking to improve scaling. With the locks around cell reads gone, some of the free threading tests were prone to starvation: the readers were able to run in a tight loop and the writer threads weren't scheduled frequently enough to make timely progress. Adjust the tests to avoid this. Co-authored-by: Donghee Na <donghee.na@python.org>
Diffstat (limited to 'Python/gc_free_threading.c')
0 files changed, 0 insertions, 0 deletions