You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a coroutine passed to run_sync doesn't finish because the event loop is stopped explicitly, the error raised is a somewhat confusing:
TimeoutError: Operation timed out after None seconds
Repro:
importasynciofromtornado.ioloopimportIOLoopasyncdefmain():
awaitasyncio.sleep(1)
# ask the loop to stopIOLoop.current().stop()
# coroutine doesn't finishawaitasyncio.sleep(10)
if__name__=="__main__":
IOLoop.current().run_sync(main)
I'm not even sure it needs to not be a TimeoutError, but the message should probably at least distinguish between the timeout having triggered and the loop stopping for other reasons. Right now, this bit assumes a timeout is the only way the loop might stop before the given coroutine exits.
The text was updated successfully, but these errors were encountered:
When a coroutine passed to
run_sync
doesn't finish because the event loop is stopped explicitly, the error raised is a somewhat confusing:Repro:
I'm not even sure it needs to not be a TimeoutError, but the message should probably at least distinguish between the timeout having triggered and the loop stopping for other reasons. Right now, this bit assumes a timeout is the only way the loop might stop before the given coroutine exits.
The text was updated successfully, but these errors were encountered: