Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-108724: Add PyMutex and _PyParkingLot APIs #109344
gh-108724: Add PyMutex and _PyParkingLot APIs #109344
Changes from all commits
410840a
6db39dc
e624733
83e60fb
3161e17
3ab7110
153a0b3
f963fd8
6f49ae7
779a401
3200ef5
880a263
717b3c9
23b91b0
279c56a
8d8035c
417e754
3ee97b1
95b0d87
3d1d2e1
e043a8e
6b1d8f9
1af0bff
f2073d0
8f1645b
a0261c1
6d4565d
a8ce6be
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to recommend using "acquire"/"release" instead of "lock"/"unlock", as the former is quite prevalent in this context (and, to my brain, "lock" evokes the object rather than the action). However, there are definitely examples of "lock"/"unlock".
Ultimately, it would be nice if the names were consistent everywhere, to avoid confusing readers. (It would also be nice if the naming were consistent in the industry and academia.) The closer we can get, the better. I'd rather this PR help us converge than diverge, but I haven't taken the time to decide which way the PR goes.😄 (My initial gut reaction was that it diverges.) Feedback on this from a couple of other core devs would be helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lock/unlock is much more common in libraries and programming languages:
Windows tends to use "wait"/"release" terminology.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I'm fine with lock/unlock (vs. acquire/release) at this point.
Regardless, I don't see this as a blocker for the PR, since it isn't public API (yet--and the name would get more scrutiny during the PEP process).