[issue39010] ProactorEventLoop raises unhandled ConnectionResetError
Jonathan Slenders
report at bugs.python.org
Tue Dec 10 16:18:18 EST 2019
Jonathan Slenders <jonathan.slenders at gmail.com> added the comment:
Even simpler, the following code will crash after so many iterations:
```
import asyncio
loop = asyncio.get_event_loop()
while True:
loop.call_soon_threadsafe(loop.stop)
loop.run_forever()
```
Adding a little sleep of 0.01s after `run_forever()` prevents the issue.
So, to me it looks like the cancellation of the `_OverlappedFuture` that wraps around the `_recv()` call from the self-pipe did not complete before we start `_recv()` again in the next `run_forever()` call. No idea if that makes sense...
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39010>
_______________________________________
More information about the Python-bugs-list
mailing list