mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.13] gh-130145: fix loop.run_forever
when loop is already running (GH-130146) (#130147)
gh-130145: fix `loop.run_forever` when loop is already running (GH-130146)
(cherry picked from commit a545749b0e
)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
parent
692d36f1fc
commit
1a7b8c0f4d
3 changed files with 18 additions and 1 deletions
|
@ -671,8 +671,8 @@ class BaseEventLoop(events.AbstractEventLoop):
|
|||
|
||||
def run_forever(self):
|
||||
"""Run until stop() is called."""
|
||||
self._run_forever_setup()
|
||||
try:
|
||||
self._run_forever_setup()
|
||||
while True:
|
||||
self._run_once()
|
||||
if self._stopping:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue