Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.12] gh-109649: Enhance os.cpu_count() documentation#110169

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Yhg1s merged 2 commits intopython:3.12fromvstinner:cpu_count_doc12
Oct 2, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedOct 1, 2023
edited by github-actionsbot
Loading

  • Doc: Specify that os.cpu_count() countslogicial CPUs.
  • Doc: Specify that os.sched_getaffinity(0) is related to the calling thread.
  • Fix test_posix.test_sched_getaffinity(): restore the old CPU mask when the test completes!

📚 Documentation preview 📚:https://cpython-previews--110169.org.readthedocs.build/

* Doc: Specify that os.cpu_count() counts *logicial* CPUs.* Doc: Specify that os.sched_getaffinity(0) is related to the calling  thread.* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask  when the test completes!
@gpsheadgpshead added the docsDocumentation in the Doc dir labelOct 1, 2023
@vstinner
Copy link
MemberAuthor

Restore removed text

Oops, I removed thelen(os.sched_getaffinity(0)) recipe in cpu_count() doc by mistake. I added it back but also clarified again, that it's a number oflogical CPUs and this number is specific to thecalling thread.

@miss-islington
Copy link
Contributor

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

@bedevere-app
Copy link

GH-110226 is a backport of this pull request to the3.11 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.11only security fixes labelOct 2, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 2, 2023
…H-110169)*pythongh-109649: Enhance os.cpu_count() documentation* Doc: Specify that os.cpu_count() counts *logicial* CPUs.* Doc: Specify that os.sched_getaffinity(0) is related to the calling  thread.* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask  when the test completes!* Restore removed text(cherry picked from commit5245b97)Co-authored-by: Victor Stinner <vstinner@python.org>
gpshead pushed a commit that referenced this pull requestOct 3, 2023
) (#110226)[3.12]gh-109649: Enhance os.cpu_count() documentation (GH-110169)*gh-109649: Enhance os.cpu_count() documentation* Doc: Specify that os.cpu_count() counts *logicial* CPUs.* Doc: Specify that os.sched_getaffinity(0) is related to the calling  thread.* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask  when the test completes!* Restore removed text(cherry picked from commit5245b97)Co-authored-by: Victor Stinner <vstinner@python.org>
@vstinnervstinner deleted the cpu_count_doc12 branchJanuary 14, 2025 08:20
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@gpsheadgpsheadgpshead approved these changes

Assignees

@Yhg1sYhg1s

Labels
docsDocumentation in the Doc dirskip newstestsTests in the Lib/test dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@vstinner@miss-islington@gpshead@Yhg1s

[8]ページ先頭

©2009-2025 Movatter.jp