* str #20262 reduce should fail explicitly on empty stream * str #20262 document reduce behaviour on empty stream
This commit is contained in:
parent
503a77f515
commit
b9ab232cac
8 changed files with 67 additions and 14 deletions
|
|
@ -573,6 +573,11 @@ final class Flow[-In, +Out, +Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends
|
|||
* Applies the given function towards its current and next value,
|
||||
* yielding the next current value.
|
||||
*
|
||||
* If the stream is empty (i.e. completes before signalling any elements),
|
||||
* the reduce stage will fail its downstream with a [[NoSuchElementException]],
|
||||
* which is semantically in-line with that Scala's standard library collections
|
||||
* do in such situations.
|
||||
*
|
||||
* '''Emits when''' upstream completes
|
||||
*
|
||||
* '''Backpressures when''' downstream backpressures
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue