takeUntil

Pass elements downstream until the predicate function returns true. The first element for which the predicate returns true is also emitted before the stream completes.

Simple operators

Signature

Source.takeUntilSource.takeUntil { scala=“#takeUntil(p:Out=>Boolean):FlowOps.this.Repr[Out]” java=“#takeUntil( org.apache.pekko.japi.function.Predicate)” } Flow.takeUntilFlow.takeUntil { scala=“#takeUntil(p:Out=>Boolean):FlowOps.this.Repr[Out]” java=“#takeUntil( org.apache.pekko.japi.function.Predicate)” }

Description

Pass elements downstream until the predicate function returns true. The first element for which the predicate returns true is also emitted before the stream completes.

Reactive Streams semantics

emits the predicate is false or the first time the predicate is true

backpressures when downstream backpressures

completes after predicate returned true or upstream completes