#19238 add detach operator and fix Detach stage
This commit is contained in:
parent
aadaf15b89
commit
b0b03176ae
9 changed files with 133 additions and 2 deletions
|
|
@ -1299,6 +1299,20 @@ trait FlowOps[+Out, +Mat] {
|
|||
via(new Throttle(cost, per, maximumBurst, costCalculation, mode))
|
||||
}
|
||||
|
||||
/**
|
||||
* Detaches upstream demand from downstream demand without detaching the
|
||||
* stream rates; in other words acts like a buffer of size 1.
|
||||
*
|
||||
* '''Emits when''' upstream emits an element
|
||||
*
|
||||
* '''Backpressures when''' downstream backpressures
|
||||
*
|
||||
* '''Completes when''' upstream completes
|
||||
*
|
||||
* '''Cancels when''' downstream cancels
|
||||
*/
|
||||
def detach: Repr[Out] = via(GraphStages.detacher)
|
||||
|
||||
/**
|
||||
* Delays the initial element by the specified duration.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue