mirror of
https://github.com/python/cpython.git
synced 2025-09-11 03:07:01 +00:00
gh-134745: Change PyThread_allocate_lock() implementation to PyMutex (#134747)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
parent
45c6c48afc
commit
ebf6d13567
7 changed files with 86 additions and 491 deletions
|
@ -119,6 +119,9 @@ _PyMutex_LockTimed(PyMutex *m, PyTime_t timeout, _PyLockFlags flags)
|
|||
return PY_LOCK_INTR;
|
||||
}
|
||||
}
|
||||
else if (ret == Py_PARK_INTR && (flags & _PY_FAIL_IF_INTERRUPTED)) {
|
||||
return PY_LOCK_INTR;
|
||||
}
|
||||
else if (ret == Py_PARK_TIMEOUT) {
|
||||
assert(timeout >= 0);
|
||||
return PY_LOCK_FAILURE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue