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>
S
Sam Gross committed
3d4ac1a2c2b610f35a9e164878d67185e4a3546f
Parent: 1b8bb1e
Committed by GitHub <noreply@github.com>
on 3/26/2025, 4:08:20 PM