Introduces eager cancellation for divertTo

* and updates Partition to support this behavior
* not adding Partition.apply overload due to type inference issues, use constructor instead
This commit is contained in:
Viktor Klang (√) 2018-01-30 19:59:53 +01:00 committed by Patrik Nordwall
parent 5b2a4edd2c
commit 08b0d34a4c
9 changed files with 105 additions and 34 deletions

View file

@ -1152,7 +1152,7 @@ class SubSource[+Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source
*
* '''Completes when''' upstream completes and no output is pending
*
* '''Cancels when''' when all downstreams cancel
* '''Cancels when''' any of the downstreams cancel
*/
def divertTo(that: Graph[SinkShape[Out], _], when: function.Predicate[Out]): SubSource[Out, Mat] =
new SubSource(delegate.divertTo(that, when.test))