divertTo

Each upstream element will either be diverted to the given sink, or the downstream consumer according to the predicate function applied to the element.

Fan-out operators

Signature

Source.divertToSource.divertTo Flow.divertToFlow.divertTo

Description

Each upstream element will either be diverted to the given sink, or the downstream consumer according to the predicate function applied to the element.

Reactive Streams semantics

emits when the chosen output stops backpressuring and there is an input element available

backpressures when the chosen output backpressures

completes when upstream completes and no output is pending

cancels when any of the downstreams cancel

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.