gh-125139: use _PyRecursiveMutex in _thread.RLock (#125144)

This commit is contained in:
Kumar Aditya 2024-10-14 14:06:31 +05:30 committed by GitHub
parent 5217328f93
commit 67f6e08147
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 63 additions and 122 deletions

View file

@ -160,8 +160,9 @@ typedef struct {
PyAPI_FUNC(int) _PyRecursiveMutex_IsLockedByCurrentThread(_PyRecursiveMutex *m);
PyAPI_FUNC(void) _PyRecursiveMutex_Lock(_PyRecursiveMutex *m);
extern PyLockStatus _PyRecursiveMutex_LockTimed(_PyRecursiveMutex *m, PyTime_t timeout, _PyLockFlags flags);
PyAPI_FUNC(void) _PyRecursiveMutex_Unlock(_PyRecursiveMutex *m);
extern int _PyRecursiveMutex_TryUnlock(_PyRecursiveMutex *m);
// A readers-writer (RW) lock. The lock supports multiple concurrent readers or
// a single writer. The lock is write-preferring: if a writer is waiting while