◐ Shell
clean mode source ↗

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.

gvanrossum

kumaraditya303

gvanrossum

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Oct 3, 2022
…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

Oct 3, 2022
…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

Oct 3, 2022
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

Oct 3, 2022
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>

carljm added a commit to carljm/cpython that referenced this pull request

Oct 3, 2022