[issue32841] Asyncio.Condition prevents cancellation

Bar Harel report at bugs.python.org
Wed Feb 14 03:12:46 EST 2018


Bar Harel <bzvi7919 at gmail.com> added the comment:

I don't think so. Having shield not cancel immediately but rather wait and
cancel will cause long timed shielded operations to stall the task
cancellation, usually for no good. This isn't the general case.
However, adding another function which does so might just be a good idea. I
think another parameter to shield to choose cancellation time will clutter
the function call.

On Wed, Feb 14, 2018, 7:28 AM Nathaniel Smith <report at bugs.python.org>
wrote:

>
> Nathaniel Smith <njs at pobox.com> added the comment:
>
> It does make me wonder if asyncio.shield *should* wait for the thing it's
> shielding though, so that it *would* work in this case? (Similar to
> bpo-32751.)
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue32841>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32841>
_______________________________________


More information about the Python-bugs-list mailing list