3 ms·
But how does one elegantly stop a chain of futures from executing when one is no longer interested in the final outcome of this chain of futures?
by amelius 11y ago
But how does one elegantly stop a chain of futures from executing when one is no longer interested in the final outcome of this chain of futures?
- batou 11y agoIn microsoft-land where I reside, they are called tasks and we cancel tasks. Technically all tasks can be collected in a list and then you just cancel everything in the list but I have yet to find a scenario where I've needed this.
- jsedgwick 11y agoFolly Futures support interrupts and cancellations. See https://github.com/facebook/folly/blob/master/folly/futures/README.md#interrupts-and-cancellations https://github.com/facebook/folly/blob/master/folly/futures/...
- deleted 11y ago[deleted]
- stuhood 11y agocom.twitter.util.Future supports raising interrupts that propagate 'backwards' through the chain (and across network boundaries.) This is used to implement cancellation, among other things. https://github.com/twitter/util/blob/master/util-core/src/main/scala/com/twitter/util/Future.scala#L764 https://github.com/twitter/util/blob/master/util-core/src/ma...