gh-94732: Fix KeyboardInterrupt race in asyncio run_forever() by hetmankp · Pull Request #97765 · python/cpython
This addresses issue python#94732, ensuring 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.
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
…ythonGH-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 3a49dbb) Co-authored-by: hetmankp <728670+hetmankp@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
…ythonGH-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 3a49dbb) Co-authored-by: hetmankp <728670+hetmankp@users.noreply.github.com>
miss-islington added a commit that referenced this pull request
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 3a49dbb) Co-authored-by: hetmankp <728670+hetmankp@users.noreply.github.com>
miss-islington added a commit that referenced this pull request
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 3a49dbb) Co-authored-by: hetmankp <728670+hetmankp@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters