Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
410840a
gh-108724: Add PyMutex and _PyParkingLot APIs
colesbury Aug 24, 2023
6db39dc
Add news entry
colesbury Sep 12, 2023
e624733
Revert change to Modules/_testcapi/parts.h
colesbury Sep 12, 2023
83e60fb
Update Tools/c-analyzer/cpython/ignored.tsv
colesbury Sep 12, 2023
3161e17
Fix _Py_atomic_store_ptr_release on winarm64
colesbury Sep 12, 2023
3ab7110
Support pthread_stubs.h and require threads for lock tests
colesbury Sep 12, 2023
153a0b3
Clean-up Windows includes and ifdefs
colesbury Sep 12, 2023
f963fd8
Fix Raspbian build
colesbury Sep 12, 2023
6f49ae7
Fix wasm tests.
colesbury Sep 13, 2023
779a401
Fix indentation
colesbury Sep 13, 2023
3200ef5
Rename PyEvent_TimedWait and _PyMutex_LockTimed
colesbury Sep 14, 2023
880a263
more_waiters -> has_more_waiters
colesbury Sep 14, 2023
717b3c9
Remove _PyMutex_State typedef
colesbury Sep 14, 2023
23b91b0
Update docs
colesbury Sep 14, 2023
279c56a
Include cpython/pyatomic.h via pyatomic.h
colesbury Sep 14, 2023
8d8035c
Use compound initializer in test_lock.c
colesbury Sep 14, 2023
417e754
Apply suggestions from code review
colesbury Sep 14, 2023
3ee97b1
Changes from review:
colesbury Sep 14, 2023
95b0d87
Remove thread-local data in parking_lot.c
colesbury Sep 15, 2023
3d1d2e1
Add doc for NUM_BUCKETS
colesbury Sep 15, 2023
e043a8e
Make use of Py_PARK_INTR more explicit in _PySemaphore_PlatformWait
colesbury Sep 15, 2023
6b1d8f9
Statically initialize buckets in parking_lot.c
colesbury Sep 15, 2023
1af0bff
Rename validate_addr to atomic_memcmp
colesbury Sep 15, 2023
f2073d0
Add is_unparking to struct wait_entry in parking_lot.c
colesbury Sep 15, 2023
8f1645b
Use callback in _PyParkingLot_Unpark
colesbury Sep 15, 2023
a0261c1
Simplify _PySemaphore_Wait.
colesbury Sep 15, 2023
6d4565d
check-c-globals: increase limit for parking_lot.c
colesbury Sep 15, 2023
a8ce6be
Changes from review
colesbury Sep 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix wasm tests.
The lock tests were being picked up twice: once in test_lock.py and once
in Test_testinternalcapi from test_misc.py. The Test_testinternalcapi
was not skipping tests when the platform doesn't have threads. This
moves the tests to test_misc.py, doesn't include them in
Test_testinternalcapi, and skips them if the platform doesn't support
threads.
  • Loading branch information
colesbury committed Sep 13, 2023
commit 6f49ae75fd2b7c85c4decd067cb3fca95207cf6b
19 changes: 0 additions & 19 deletions Lib/test/test_capi/test_lock.py

This file was deleted.

10 changes: 9 additions & 1 deletion Lib/test/test_capi/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,15 @@ def test_version_api_data(self):
class Test_testinternalcapi(unittest.TestCase):
locals().update((name, getattr(_testinternalcapi, name))
for name in dir(_testinternalcapi)
if name.startswith('test_'))
if name.startswith('test_')
and not name.startswith('test_lock_'))


@threading_helper.requires_working_threading()
class Test_PyLock(unittest.TestCase):
locals().update((name, getattr(_testinternalcapi, name))
for name in dir(_testinternalcapi)
if name.startswith('test_lock_'))


@unittest.skipIf(_testmultiphase is None, "test requires _testmultiphase module")
Expand Down