takeWhile
Pass elements downstream as long as a predicate function returns true and then complete.
Signature
Source.takeWhile
Flow.takeWhile
Description
Pass elements downstream as long as a predicate function returns true and then complete. The element for which the predicate returns false is not emitted.
Example
Reactive Streams semantics
emits while the predicate is true and until the first false result
backpressures when downstream backpressures
completes when predicate returned false or upstream completes