[Async-sig] killing tasks that won't cancel

Chris Jerdonek chris.jerdonek at gmail.com
Tue Feb 19 15:48:28 EST 2019


On Tue, Feb 19, 2019 at 12:33 PM Yury Selivanov <yselivanov at gmail.com>
wrote:

> Unfortunately asyncio isn't super flexible around "cancellation with a
> timeout" kind of scenarios. The current assumption is that once the
> cancellation is requested, the Task will start cancelling and will do so in
> a timely manner.  Imposing a second layer of timeouts on the cancellation
> process itself isn't natively supported.  But to properly address this we
> don't need a very broadly defined Task.set_exception();


Yes, I agree. I was just using Task.set_exception() because that is all
that was available. (And I agree set_result() isn't needed.)

--Chris



> we need to rethink the cancellation in asyncio (perhaps draw some
> inspiration from Trio and other frameworks).
>
> Yury
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/async-sig/attachments/20190219/c5773f72/attachment.html>


More information about the Async-sig mailing list