From: Victor Stinner Date: Fri, 24 Sep 2021 22:40:18 +0000 (+0200) Subject: bpo-41299: Fix EnterNonRecursiveMutex() (GH-28548) X-Git-Tag: v3.11.0a1~75 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d639e3170506a1a80c4b2f1b3a6250bb95ff190a;p=thirdparty%2FPython%2Fcpython.git bpo-41299: Fix EnterNonRecursiveMutex() (GH-28548) Remove Py_FatalError() call: the code works even if now is negative. --- diff --git a/Python/thread_nt.h b/Python/thread_nt.h index 0ce5e94f89bf..e9dc880115f6 100644 --- a/Python/thread_nt.h +++ b/Python/thread_nt.h @@ -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) {