Title: Race with KeyboardInterrupt in asyncio loop run_forever() method · Issue #94732 · python/cpython · GitHub
Open Graph Title: Race with KeyboardInterrupt in asyncio loop run_forever() method · Issue #94732 · python/cpython
X Title: Race with KeyboardInterrupt in asyncio loop run_forever() method · Issue #94732 · python/cpython
Description: There is a race with the KeyboardInterrupt exception in the asyncio.base_events.BaseEventLoop.run_forever() method. While an attempt is made to restore the environment to its previous state before run_forever() completes with a try...fin...
Open Graph Description: There is a race with the KeyboardInterrupt exception in the asyncio.base_events.BaseEventLoop.run_forever() method. While an attempt is made to restore the environment to its previous state before ...
X Description: There is a race with the KeyboardInterrupt exception in the asyncio.base_events.BaseEventLoop.run_forever() method. While an attempt is made to restore the environment to its previous state before ...
Opengraph URL: https://github.com/python/cpython/issues/94732
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Race with KeyboardInterrupt in asyncio loop run_forever() method","articleBody":"There is a race with the `KeyboardInterrupt` exception in the **asyncio.base_events.BaseEventLoop.run_forever()** method. While an attempt is made to restore the environment to its previous state before `run_forever()` completes with a `try...finally`, a couple items find themselves outside the `try...finally`. Specifically, a badly timed `KeyboardInterrupt` will mean that, neither the `self._thread_id` value or the hooks set by `sys.set_asyncgen_hooks()` will be correctly restored. Both of these should be moved inside the `try...finally`.\r\n\r\nhttps://github.com/python/cpython/blob/c9118afd045a64ca22d4a8cc5d43532607083b2d/Lib/asyncio/base_events.py#L596-L600\r\n\r\nThis applies to all existing version of Python on all platforms.","author":{"url":"https://github.com/hetmankp","@type":"Person","name":"hetmankp"},"datePublished":"2022-07-11T06:13:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/94732/cpython/issues/94732"}
| 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:cd4c1af1-3518-7169-3e71-52d180a36149 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4AA:1F3593:32ADB:4450D:6969507D |
| html-safe-nonce | f1fb7a04fdfb83af582181db05bb9a899677895619cbf7e18418f663763f8a27 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEFBOjFGMzU5MzozMkFEQjo0NDUwRDo2OTY5NTA3RCIsInZpc2l0b3JfaWQiOiI4OTEzMTU4MjMzMTQ0MjUwNDkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | da8cc4b3dd149f58e349d5065043cadb9b4a2a0ceab0404a13a7a0c635543423 |
| hovercard-subject-tag | issue:1300255414 |
| 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/94732/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9789995bd826ebc93577eaa594537c38236efd0c87fc160c8a3d18ff6e8fbd2c/python/cpython/issues/94732 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9789995bd826ebc93577eaa594537c38236efd0c87fc160c8a3d18ff6e8fbd2c/python/cpython/issues/94732 |
| og:image:alt | There is a race with the KeyboardInterrupt exception in the asyncio.base_events.BaseEventLoop.run_forever() method. While an attempt is made to restore the environment to its previous state before ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hetmankp |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| 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 | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width