Skip to content
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

gh-110850: Use _PyDeadline_Get() in EnterNonRecursiveMutex() #118556

Merged
merged 1 commit into from
May 4, 2024

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 3, 2024

Use _PyDeadline_Init() and _PyDeadline_Get() in
EnterNonRecursiveMutex() of thread_nt.h.

_PyDeadline_Get() uses the monotonic clock which is now the same as the perf counter clock on all platforms. So this change does not cause any behavior change. It just reuses existing helper functions.

Use _PyDeadline_Init() and _PyDeadline_Get() in
EnterNonRecursiveMutex() of thread_nt.h.

_PyDeadline_Get() uses the monotonic clock which is now the same as
the perf counter clock on all platforms. So this change does not
cause any behavior change. It just reuses existing helper functions.
Copy link
Contributor

@colesbury colesbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vstinner vstinner merged commit 0b7814e into python:main May 4, 2024
38 checks passed
@vstinner vstinner deleted the thread_nt branch May 4, 2024 07:39
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
…ython#118556)

Use _PyDeadline_Init() and _PyDeadline_Get() in
EnterNonRecursiveMutex() of thread_nt.h.

_PyDeadline_Get() uses the monotonic clock which is now the same as
the perf counter clock on all platforms. So this change does not
cause any behavior change. It just reuses existing helper functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants