Skip to content

[3.14] gh-161712: Read the clock once in ThreadHandle_join() (GH-161771) - #161843

Merged
vstinner merged 1 commit into
python:3.14from
miss-islington:backport-88d137a-3.14
Nov 13, 2026
Merged

vstinner merged 1 commit into
python:3.14from
miss-islington:backport-88d137a-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Py_MAX() evaluated _PyDeadline_Get() twice. If the deadline passed
between the two calls, the negative second value was used as the
timeout, which means no timeout, and Thread.join(timeout) could block
forever. main already reads it once since gh-157495.
(cherry picked from commit 88d137a)

Co-authored-by: Ahmed Semih Özmekik ahmed-semih@outlook.com

…ythonGH-161771)

Py_MAX() evaluated _PyDeadline_Get() twice. If the deadline passed
between the two calls, the negative second value was used as the
timeout, which means no timeout, and Thread.join(timeout) could block
forever. main already reads it once since pythongh-157495.
(cherry picked from commit 88d137a)

Co-authored-by: Ahmed Semih Özmekik <ahmed-semih@outlook.com>
@vstinner
vstinner merged commit c262540 into python:3.14 Nov 13, 2026
51 checks passed
@miss-islington
miss-islington deleted the backport-88d137a-3.14 branch November 13, 2026 01:27
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