This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tmewett
Recipients asvetlov, aymeric.augustin, tmewett, yselivanov
Date 2020-08-14.13:48:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1597412899.9.0.800154529598.issue33727@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-08-14 13:48:19tmewettsetrecipients: + tmewett, asvetlov, aymeric.augustin, yselivanov
2020-08-14 13:48:19tmewettsetmessageid: <1597412899.9.0.800154529598.issue33727@roundup.psfhosted.org>
2020-08-14 13:48:19tmewettlinkissue33727 messages
2020-08-14 13:48:19tmewettcreate