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
Cancellation is propagated if not handled/shielded.
For example, when cancelling a Server.wait_closed, the handler tasks one is waiting for will be cancelled. We should carefully examine the public API and prevent futures from cancellation which shouldn't be cancelled.
Edit: This also affects the internal API. And coroutines are often moved into tasks, so we basically have to look at every yield from. An alternative to add tons of asyncio.shield is to mark a specific internal coroutine/task/future as don't cancel unless you really want to exit now. Candidates for this are, among others, ServerProtocol.handler and ServerProtocol.handle_client.
Edit 2: Wow, this issue sounds more scary than it actually is. Don't worry. The only critical operations affected here are enqueues into the task queue. But since the queue is unlimited, it will never block at the moment.
The text was updated successfully, but these errors were encountered:
Cancellation is propagated if not handled/shielded.
For example, when cancelling a
Server.wait_closed
, the handler tasks one is waiting for will be cancelled. We should carefully examine the public API and prevent futures from cancellation which shouldn't be cancelled.Edit: This also affects the internal API. And coroutines are often moved into tasks, so we basically have to look at every
yield from
. An alternative to add tons ofasyncio.shield
is to mark a specific internal coroutine/task/future as don't cancel unless you really want to exit now. Candidates for this are, among others,ServerProtocol.handler
andServerProtocol.handle_client
.Edit 2: Wow, this issue sounds more scary than it actually is. Don't worry. The only critical operations affected here are enqueues into the task queue. But since the queue is unlimited, it will never block at the moment.
The text was updated successfully, but these errors were encountered: