mirror of
https://github.com/python/cpython.git
synced 2026-11-09 06:00:54 +08:00
Queue.get() and Queue.put() computed their timeout deadline from
time.time(), the wall clock. If the system clock was stepped (NTP, a
manual change) while a call was blocked, the timeout could over- or
under-wait. queue.Queue uses time.monotonic() for the same reason.
Compute the deadline and check it against time.monotonic() instead.
(cherry picked from commit b94b9c8886)
Co-authored-by: Vyron Vasileiadis <[email protected]>