Message299112
> Will it cancel whole chain of depending futures in a RIGHT way ?
I was thinking about this:
def Future.set_exception(exc):
if isinstance(exc, asyncio.CancelledError):
return self._cancel(exc)
# here goes old code
def Future.cancel():
return self._cancel(asyncio.CancelledError())
Although now, that I'm looking at it, I don't like this idea, because setting as exception is a different operation from cancelling a task/future, and we shouldn't mix them. It's OK to set a CancelledError without cancelling. Also this would be a backwards incompatible change.
So back to square one -- we can consider passing extra args to .cancel() methods. |
|
Date |
User |
Action |
Args |
2017-07-25 15:34:11 | yselivanov | set | recipients:
+ yselivanov, socketpair, matrixise |
2017-07-25 15:34:11 | yselivanov | set | messageid: <1500996851.55.0.781833832187.issue31033@psf.upfronthosting.co.za> |
2017-07-25 15:34:11 | yselivanov | link | issue31033 messages |
2017-07-25 15:34:11 | yselivanov | create | |
|