gh-94732: Fix KeyboardInterrupt race in asyncio run_forever() (GH-97765)
Ensure that the event loop's `_thread_id` attribute and the asyncgen hooks set by `sys.set_asyncgen_hooks()` are always restored no matter where a KeyboardInterrupt exception is raised. (cherry picked from commit 3a49dbb98ccc1b90554ed181386316efa38adfba) Co-authored-by: hetmankp <728670+hetmankp@users.noreply.github.com>
M
Miss Islington (bot) committed
4420da0aefc31b066f3b0d80ceed8ce0edbcc7c2
Parent: fe99b64
Committed by GitHub <noreply@github.com>
on 10/3/2022, 9:39:24 PM