Skip to content

bpo-41710: Fix PY_TIMEOUT_MAX on Windows #28673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 1, 2021
Merged

bpo-41710: Fix PY_TIMEOUT_MAX on Windows #28673

merged 2 commits into from
Oct 1, 2021

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Oct 1, 2021

WaitForSingleObject() accepts timeout in milliseconds in the range
[0; 0xFFFFFFFE] (DWORD type). INFINITE value (0xFFFFFFFF) means no
timeout. 0xFFFFFFFE milliseconds is around 49.7 days.

PY_TIMEOUT_MAX is (0xFFFFFFFE * 1000) milliseconds on Windows, around
49.7 days.

Partially revert commit 37b8294.

https://bugs.python.org/issue41710

WaitForSingleObject() accepts timeout in milliseconds in the range
[0; 0xFFFFFFFE] (DWORD type). INFINITE value (0xFFFFFFFF) means no
timeout. 0xFFFFFFFE milliseconds is around 49.7 days.

PY_TIMEOUT_MAX is (0xFFFFFFFE * 1000) milliseconds on Windows, around
49.7 days.

Partially revert commit 37b8294.
@vstinner
Copy link
Member Author

vstinner commented Oct 1, 2021

See #28672 (comment) for details about the timeout limit.

@vstinner vstinner merged commit 98d2827 into python:main Oct 1, 2021
@vstinner vstinner deleted the timeout_ms_max branch October 1, 2021 11:03
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.

4 participants