Title: _PyOS_SigintEvent() is needed for interruptible waiting on main thread · Issue #128684 · python/cpython · GitHub
Open Graph Title: _PyOS_SigintEvent() is needed for interruptible waiting on main thread · Issue #128684 · python/cpython
X Title: _PyOS_SigintEvent() is needed for interruptible waiting on main thread · Issue #128684 · python/cpython
Description: Bug report Bug description: Moved from #108605 (comment) In #108605, _PyOS_SigintEvent was removed from the public headers. TensorStore relies on that function here: https://github.com/google/tensorstore/blob/eda046b10158e7d82fdb0f23aeec...
Open Graph Description: Bug report Bug description: Moved from #108605 (comment) In #108605, _PyOS_SigintEvent was removed from the public headers. TensorStore relies on that function here: https://github.com/google/tenso...
X Description: Bug report Bug description: Moved from #108605 (comment) In #108605, _PyOS_SigintEvent was removed from the public headers. TensorStore relies on that function here: https://github.com/google/tenso...
Opengraph URL: https://github.com/python/cpython/issues/128684
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"_PyOS_SigintEvent() is needed for interruptible waiting on main thread","articleBody":"# Bug report\n\n### Bug description:\n\nMoved from https://github.com/python/cpython/pull/108605#issuecomment-2521215855\n\nIn https://github.com/python/cpython/pull/108605, `_PyOS_SigintEvent` was removed from the public headers.\n\nTensorStore relies on that function here: https://github.com/google/tensorstore/blob/eda046b10158e7d82fdb0f23aeecdfdeb8ac5aa3/python/tensorstore/future.cc#L105 to enable synchronously blocking on the readiness of a custom Future type while allowing Ctrl+C to interrupt when running on the main thread.\n\nThe current workaround is to manually declare the function since the symbol is still available.\n\nI'm not aware of a usable alternative. Since `signal.set_wakeup_fd` only allows a single fd to be set globally, it isn't usable from a library. The best alternative would probably be to poll by waking up every few hundred milliseconds.\n\n\n### CPython versions tested on:\n\n3.13\n\n### Operating systems tested on:\n\n_No response_","author":{"url":"https://github.com/jbms","@type":"Person","name":"jbms"},"datePublished":"2025-01-09T17:16:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/128684/cpython/issues/128684"}
| 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:157886e0-e217-90a9-0fe0-6bcde418eb0f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5F4:388B78:B59CAA:EAAE19:696AFB48 |
| html-safe-nonce | a1fc8a6dddbf980a9190a13d93cd9362d7e4b9ef65f774c12d72742e3271e615 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUY0OjM4OEI3ODpCNTlDQUE6RUFBRTE5OjY5NkFGQjQ4IiwidmlzaXRvcl9pZCI6Ijc0MTc4Njg2Njc1NzY4NDMwODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cf47f02961edce21c5a7a91a4a4dccf91ae599c047965a14ef1a0770533d5ed0 |
| hovercard-subject-tag | issue:2778361579 |
| 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/128684/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e4fa15a5b89c85a82f1a55f464d75422ec61caf72906e9cdc167cf7050e039de/python/cpython/issues/128684 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e4fa15a5b89c85a82f1a55f464d75422ec61caf72906e9cdc167cf7050e039de/python/cpython/issues/128684 |
| og:image:alt | Bug report Bug description: Moved from #108605 (comment) In #108605, _PyOS_SigintEvent was removed from the public headers. TensorStore relies on that function here: https://github.com/google/tenso... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jbms |
| 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