mirror of
https://github.com/python/cpython.git
synced 2025-10-14 10:53:40 +00:00
gh-130145: fix loop.run_forever
when loop is already running (#130146)
This commit is contained in:
parent
a05433f24a
commit
a545749b0e
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