OrElse stage for fallback when no elements emitted #21024
This commit is contained in:
parent
fbfc8b4c58
commit
012919fdb3
12 changed files with 465 additions and 7 deletions
|
|
@ -1252,6 +1252,24 @@ If materialized values needs to be collected ``prependMat`` is available.
|
|||
|
||||
**completes** when all upstreams complete
|
||||
|
||||
orElse
|
||||
^^^^^^
|
||||
If the primary source completes without emitting any elements, the elements from the secondary source
|
||||
are emitted. If the primary source emits any elements the secondary source is cancelled.
|
||||
|
||||
Note that both sources are materialized directly and the secondary source is backpressured until it becomes
|
||||
the source of elements or is cancelled.
|
||||
|
||||
Signal errors downstream, regardless which of the two sources emitted the error.
|
||||
|
||||
**emits** when an element is available from first stream or first stream closed without emitting any elements and an element
|
||||
is available from the second stream
|
||||
|
||||
**backpressures** when downstream backpressures
|
||||
|
||||
**completes** the primary stream completes after emitting at least one element, when the primary stream completes
|
||||
without emitting and the secondary stream already has completed or when the secondary stream completes
|
||||
|
||||
interleave
|
||||
^^^^^^^^^^
|
||||
Emits a specifiable number of elements from the original source, then from the provided source and repeats. If one
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue