mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
bpo-41299: Fix EnterNonRecursiveMutex() (GH-28548)
Remove Py_FatalError() call: the code works even if now is negative.
This commit is contained in:
parent
f35ddf2422
commit
d639e31705
1 changed files with 0 additions and 3 deletions
|
|
@ -77,9 +77,6 @@ EnterNonRecursiveMutex(PNRMUTEX mutex, DWORD milliseconds)
|
|||
} else if (milliseconds != 0) {
|
||||
/* wait at least until the target */
|
||||
_PyTime_t now = _PyTime_GetPerfCounter();
|
||||
if (now <= 0) {
|
||||
Py_FatalError("_PyTime_GetPerfCounter() == 0");
|
||||
}
|
||||
_PyTime_t nanoseconds = _PyTime_FromNanoseconds((_PyTime_t)milliseconds * 1000000);
|
||||
_PyTime_t target = now + nanoseconds;
|
||||
while (mutex->locked) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue