Title: Allow multiprocessing finalizers to run on a separate thread · Issue #109978 · python/cpython · GitHub
Open Graph Title: Allow multiprocessing finalizers to run on a separate thread · Issue #109978 · python/cpython
X Title: Allow multiprocessing finalizers to run on a separate thread · Issue #109978 · python/cpython
Description: Feature or enhancement Proposal: The multiprocessing library allows finalizers to be attached to specific objects, so as to release system resources. These finalizers may have non-trivial code that rely on and alter global state. Unfortu...
Open Graph Description: Feature or enhancement Proposal: The multiprocessing library allows finalizers to be attached to specific objects, so as to release system resources. These finalizers may have non-trivial code that...
X Description: Feature or enhancement Proposal: The multiprocessing library allows finalizers to be attached to specific objects, so as to release system resources. These finalizers may have non-trivial code that...
Opengraph URL: https://github.com/python/cpython/issues/109978
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow multiprocessing finalizers to run on a separate thread","articleBody":"# Feature or enhancement\r\n\r\n### Proposal:\r\n\r\nThe multiprocessing library allows finalizers to be attached to specific objects, so as to release system resources. These finalizers may have non-trivial code that rely on and alter global state.\r\n\r\nUnfortunately, since mainline code can be interrupted at any time by the GC, there can be rare reentrancy issues with such non-trivial finalizers, such as in gh-109593.\r\n\r\nIdeally, we would run such finalizers in a separate thread rather than from inside the GC.\r\n\r\nNote this is related to https://peps.python.org/pep-0556/, but much more focussed and therefore with a higher chance of success.\r\n\r\n### Has this already been discussed elsewhere?\r\n\r\nThis is a minor feature, which does not need previous discussion elsewhere\r\n\r\n### Links to previous discussion of this feature:\r\n\r\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-110510\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/pitrou","@type":"Person","name":"pitrou"},"datePublished":"2023-09-27T16:57:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/109978/cpython/issues/109978"}
| 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:b2e5d15a-c0bb-b59f-e145-1d93008c7249 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A408:33DB09:BA79E:EF29E:696AF8A2 |
| html-safe-nonce | c5c426ceb7b0d44c5b284d7775bd94c2f969b071cf6c238bbaf047237c4ff4d4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDA4OjMzREIwOTpCQTc5RTpFRjI5RTo2OTZBRjhBMiIsInZpc2l0b3JfaWQiOiI1NjQ0MDk5NTcyOTI5ODUzNjAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d734bcb9d02de928fe7356981a277cb8b84a3746ce45e094a0440d3066690497 |
| hovercard-subject-tag | issue:1915983128 |
| 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/109978/issue_layout |
| twitter:image | https://opengraph.githubassets.com/76ca93e780ffc9822c048e3f44b4150a9ba470f7c629acf8d73a6e5a6ae556e5/python/cpython/issues/109978 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76ca93e780ffc9822c048e3f44b4150a9ba470f7c629acf8d73a6e5a6ae556e5/python/cpython/issues/109978 |
| og:image:alt | Feature or enhancement Proposal: The multiprocessing library allows finalizers to be attached to specific objects, so as to release system resources. These finalizers may have non-trivial code that... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pitrou |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width