Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.7] bpo-39847: EnterNonRecursiveMutex() uses GetTickCount64() (pyth…
…onGH-18780) (pythonGH-18959) The 32-bit (49-day) TickCount relied on in EnterNonRecursiveMutex can overflow in the gap between the 'target' time and the 'now' time WaitForSingleObjectEx returns, causing the loop to think it needs to wait another 49 days. This is most likely to happen when the machine is hibernated during WaitForSingleObjectEx. This makes acquiring a lock/event/etc from the _thread or threading module appear to never timeout. Replace with GetTickCount64 - this is OK now Python no longer supports XP which lacks it, and is in use for time.monotonic(). Co-authored-by: And Clover <[email protected]> (cherry picked from commit 64838ce) Co-authored-by: bobince <[email protected]>
- Loading branch information