Skip to content

gh-115942: Add locked to several multiprocessing locks - #115944

Merged
sobolevn merged 10 commits into
python:mainfrom
sobolevn:issue-115942
Apr 8, 2025
Merged

gh-115942: Add locked to several multiprocessing locks#115944
sobolevn merged 10 commits into
python:mainfrom
sobolevn:issue-115942

Conversation

@sobolevn

@sobolevnsobolevn commented Feb 26, 2024

Copy link
Copy Markdown
Member

TODO:

  • Get field-expert's approval
  • Docs
  • News

@sobolevn
sobolevn marked this pull request as ready for review March 13, 2024 06:44
@sobolevn
sobolevn requested a review from gpshead as a code ownerMarch 13, 2024 06:44
@sobolevn

Copy link
Copy Markdown
MemberAuthor

@gpshead do you have an opinion about this? :)

@sobolevn

Copy link
Copy Markdown
MemberAuthor

friendly ping @gpshead

Comment threadModules/_threadmodule.c Outdated
Co-authored-by: mpage <mpage@cs.stanford.edu>
Comment threadModules/_threadmodule.c Outdated
@gpshead

Copy link
Copy Markdown
Member

FWIW this PR makes sense to me.

@sobolevn

Copy link
Copy Markdown
MemberAuthor

Ok, then I will add all the missing details. Thanks a lot! 👍

Comment threadLib/test/_test_multiprocessing.py

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add tests on threading.RLock.locked().

@picnixzpicnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just some rewording. Otherwise, once tests requested by Victor are added, LGTM.

Comment threadDoc/library/multiprocessing.rst Outdated
Comment threadDoc/library/multiprocessing.rst Outdated
Comment threadDoc/library/threading.rst Outdated
Comment threadModules/_threadmodule.c Outdated
@sobolevn

Copy link
Copy Markdown
MemberAuthor

@vstinner@gpshead this is now ready to be reviewed :)

@sobolevn
sobolevn requested review from mpage and vstinnerApril 1, 2025 09:43
Comment threadLib/threading.py Outdated
Comment threadLib/importlib/_bootstrap.py

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment threadDoc/library/multiprocessing.rst Outdated
Comment threadDoc/library/multiprocessing.rst Outdated
Comment threadDoc/library/threading.rst Outdated
Comment threadDoc/library/threading.rst Outdated
Comment threadLib/threading.py Outdated
Comment threadModules/_threadmodule.c Outdated
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

@gpsheadgpshead left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wish I could object to this being a locked() method instead of a .locked property... but this is matching an existing ancient API on purpose so... LGTM.

@sobolevn
sobolevn merged commit f7305a0 into python:mainApr 8, 2025
@sobolevn

Copy link
Copy Markdown
MemberAuthor

Thanks everyone! 🎉

Sign up for freeto 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.

6 participants

@sobolevn@gpshead@vstinner@mpage@hugovk@picnixz