Commit graph

3 commits

Author SHA1 Message Date
Sam Gross
3d4ac1a2c2
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>
2025-03-26 12:08:20 -04:00
Victor Stinner
b2ca26875a
gh-131152: Remove unused imports from tests (part 2) (#131154) 2025-03-13 10:57:40 +01:00
Xuanteng Huang
55f17b77c3
gh-128714: Fix function object races in __annotate__, __annotations__ and __type_params__ in free-threading build (#129016) 2025-02-06 20:10:50 +05:30