Author mandolaerik
Recipients asvetlov, mandolaerik, yselivanov
Date 2021-05-24.13:54:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621864500.68.0.698974665146.issue44225@roundup.psfhosted.org>
In-reply-to
Content
If you call stop() on an already stopped event loop, then the next call to run_forever will terminate after one loop iteration. I would expect the stop to either be a nop, or to be invalid in this state (and raise an exception).

Example:

import asyncio
async def coro(x):
    print(x)
    if x < 10:
        asyncio.create_task(coro(x+1))
loop = asyncio.get_event_loop()
loop.create_task(coro(0))
loop.stop()
loop.run_forever()
History
Date User Action Args
2021-05-24 13:55:00mandolaeriksetrecipients: + mandolaerik, asvetlov, yselivanov
2021-05-24 13:55:00mandolaeriksetmessageid: <1621864500.68.0.698974665146.issue44225@roundup.psfhosted.org>
2021-05-24 13:55:00mandolaeriklinkissue44225 messages
2021-05-24 13:54:59mandolaerikcreate