Author yselivanov
Recipients matrixise, socketpair, yselivanov
Date 2017-07-25.15:34:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 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:11yselivanovsetrecipients: + yselivanov, socketpair, matrixise
2017-07-25 15:34:11yselivanovsetmessageid: <>
2017-07-25 15:34:11yselivanovlinkissue31033 messages
2017-07-25 15:34:11yselivanovcreate