Tom <t...@collider.in> added the comment:

I ran into this while working on an asyncio application using
asyncio.start_server.

>From the documentation, I expected the combination of `close` and `wait_closed`
to wait until all connection handlers have finished. Instead, handlers remaining
running with open connections as background tasks. I wanted to be able to
"gracefully" close the server, with all processing done, so I could inspect some
results for a test case.

Could there be a method for this? One suggestion would be:

*   Clarify the current behaviour of `close` and `wait_closed`
    (https://bugs.python.org/issue34852)
*   Add new coro `wait_finished` which waits until all handler tasks are done

I'm afraid I'm not familiar with low-level asyncio APIs like transports and
protocols, so I don't know how/if this fits in with those.

----------
nosy: +tmewett

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33727>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to