Title: threading Thread.join should call the OS join API · Issue #110829 · python/cpython · GitHub
Open Graph Title: threading Thread.join should call the OS join API · Issue #110829 · python/cpython
X Title: threading Thread.join should call the OS join API · Issue #110829 · python/cpython
Description: Feature or enhancement Proposal: threading.Thread.join() only waits for the CPython internals to wash its hands of the underlying thread. It doesn't actually wait for the OS thread itself to exit, which in theory happens rapidly as its f...
Open Graph Description: Feature or enhancement Proposal: threading.Thread.join() only waits for the CPython internals to wash its hands of the underlying thread. It doesn't actually wait for the OS thread itself to exit, ...
X Description: Feature or enhancement Proposal: threading.Thread.join() only waits for the CPython internals to wash its hands of the underlying thread. It doesn't actually wait for the OS thread itself to ex...
Opengraph URL: https://github.com/python/cpython/issues/110829
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"threading Thread.join should call the OS join API","articleBody":"# Feature or enhancement\n\n### Proposal:\n\n`threading.Thread.join()` only waits for the CPython internals to wash its hands of the underlying thread. It doesn't actually wait for the OS thread itself to exit, which in theory happens rapidly as its final internal code completes quickly - but we have no good wait to determine.\n\nWhy finally do this now? Now that we're encouraging people to notice and avoid threading existing when `os.fork` is called in 3.12, a use case has come up for deterministically knowing when the thread is done at the OS level so that the code can proceed with `os.fork`.\n\nhttps://github.com/python/cpython/pull/110510 could use this in an atfork before fork handler for example.\n\nPOSIX has pthread_join, we should be able to expose and use via `_thread`. Windows presumably has an equivalent concept API.\n\n### Has this already been discussed elsewhere?\n\nNo response given\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-110848\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/gpshead","@type":"Person","name":"gpshead"},"datePublished":"2023-10-13T13:31:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/110829/cpython/issues/110829"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a6774590-64c8-9885-f0b2-a4abe1e9e1b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 830A:2635C7:519B8E:6D00C8:6969C9DA |
| html-safe-nonce | bf09b134259ebaf1fb78a14465a5775429ef20cf7e03663a69822e18ea33719d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzBBOjI2MzVDNzo1MTlCOEU6NkQwMEM4OjY5NjlDOURBIiwidmlzaXRvcl9pZCI6IjcyNzg1NzE4NDg2OTE0Njg3NjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a49b01ce75c96ef48bfd24cc78ea1a46ceed7e48b8476f1a1882fead09870e61 |
| hovercard-subject-tag | issue:1941973653 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/110829/issue_layout |
| twitter:image | https://opengraph.githubassets.com/34289675d681247e374804b250f8fa0a880b6c018319b556472501c6d86d9305/python/cpython/issues/110829 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/34289675d681247e374804b250f8fa0a880b6c018319b556472501c6d86d9305/python/cpython/issues/110829 |
| og:image:alt | Feature or enhancement Proposal: threading.Thread.join() only waits for the CPython internals to wash its hands of the underlying thread. It doesn't actually wait for the OS thread itself to exit, ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gpshead |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width