Skip to content

bpo-41299: fix 16ms jitter in Windows threading timeouts#26568

Merged
zooba merged 1 commit intopython:mainfrom
lunixbochs:bpo-41299
Jun 7, 2021
Merged

bpo-41299: fix 16ms jitter in Windows threading timeouts#26568
zooba merged 1 commit intopython:mainfrom
lunixbochs:bpo-41299

Conversation

@lunixbochs
Copy link
Contributor

@lunixbochs lunixbochs commented Jun 6, 2021

GetTickCount64() is quantized to 16ms, which makes it unsuitable for measuring short timeouts.

QueryPerformanceCounter() has been guaranteed to work since Windows XP. It should only return an error if you pass in an unaligned pointer, which should only happen if your compiler doesn't align the stack.

https://bugs.python.org/issue41299

@zooba zooba merged commit 449e6f0 into python:main Jun 7, 2021
@miss-islington
Copy link
Contributor

Thanks @lunixbochs for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @lunixbochs and @zooba, I had trouble checking out the 3.10 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 449e6f0ef395231e3abe467f910b02d7f075c27f 3.10

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 7, 2021
… precision time source (pythonGH-26568)

(cherry picked from commit 449e6f0)

Co-authored-by: Ryan Hileman <[email protected]>
@bedevere-bot
Copy link

GH-26579 is a backport of this pull request to the 3.9 branch.

@zooba zooba added needs backport to 3.10 only security fixes and removed needs backport to 3.10 only security fixes labels Jun 7, 2021
@miss-islington
Copy link
Contributor

Thanks @lunixbochs for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jun 7, 2021
@bedevere-bot
Copy link

GH-26580 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 7, 2021
… precision time source (pythonGH-26568)

(cherry picked from commit 449e6f0)

Co-authored-by: Ryan Hileman <[email protected]>
miss-islington added a commit that referenced this pull request Jun 11, 2021
… precision time source (GH-26568)

(cherry picked from commit 449e6f0)

Co-authored-by: Ryan Hileman <[email protected]>
pablogsal pushed a commit that referenced this pull request Jun 20, 2021
… precision time source (GH-26568) (GH-26580)

(cherry picked from commit 449e6f0)

Co-authored-by: Ryan Hileman <[email protected]>

Co-authored-by: Ryan Hileman <[email protected]>
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.

5 participants