aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-09-25 00:40:18 +0200
committerGitHub <noreply@github.com>2021-09-25 00:40:18 +0200
commitd639e3170506a1a80c4b2f1b3a6250bb95ff190a (patch)
tree5755664196f9bf7e8fc3852532df0ed761690145
parentbpo-41299: QueryPerformanceFrequency() cannot fail (GH-28552) (diff)
downloadcpython-d639e3170506a1a80c4b2f1b3a6250bb95ff190a.tar.gz
cpython-d639e3170506a1a80c4b2f1b3a6250bb95ff190a.tar.bz2
cpython-d639e3170506a1a80c4b2f1b3a6250bb95ff190a.zip
bpo-41299: Fix EnterNonRecursiveMutex() (GH-28548)
Remove Py_FatalError() call: the code works even if now is negative.
-rw-r--r--Python/thread_nt.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/Python/thread_nt.h b/Python/thread_nt.h
index 0ce5e94f89b..e9dc880115f 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) {