Skip to content

[3.15] gh-153005: Use a monotonic clock for concurrent.interpreters Queue timeouts (GH-154156) - #155967

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-b94b9c8-3.15
Oct 10, 2026
Merged

serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-b94b9c8-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

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 b94b9c8)

Co-authored-by: Vyron Vasileiadis hi@fedonman.com

…eue timeouts (pythonGH-154156)

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 b94b9c8)

Co-authored-by: Vyron Vasileiadis <hi@fedonman.com>
@serhiy-storchaka
serhiy-storchaka merged commit 8955af5 into python:3.15 Oct 10, 2026
56 checks passed
@miss-islington
miss-islington deleted the backport-b94b9c8-3.15 branch October 10, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants