!str #19732 Concise and consistent way to mark async boundaries
This commit is contained in:
parent
d154fad4e9
commit
4e49d75ad8
25 changed files with 125 additions and 194 deletions
|
|
@ -82,27 +82,6 @@ class SubSource[+Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source
|
|||
def via[T, M](flow: Graph[FlowShape[Out, T], M]): SubSource[T, Mat] =
|
||||
new SubSource(delegate.via(flow))
|
||||
|
||||
/**
|
||||
* Transform this [[SubSource]] by appending the given processing steps, ensuring
|
||||
* that an `asyncBoundary` attribute is set around those steps.
|
||||
* {{{
|
||||
* +----------------------------+
|
||||
* | Resulting Source |
|
||||
* | |
|
||||
* | +------+ +------+ |
|
||||
* | | | | | |
|
||||
* | | this | ~Out~> | flow | ~~> T
|
||||
* | | | | | |
|
||||
* | +------+ +------+ |
|
||||
* +----------------------------+
|
||||
* }}}
|
||||
* The materialized value of the combined [[Flow]] will be the materialized
|
||||
* value of the current flow (ignoring the other Flow’s value), use
|
||||
* [[Flow#viaMat viaMat]] if a different strategy is needed.
|
||||
*/
|
||||
def viaAsync[T, M](flow: Graph[FlowShape[Out, T], M]): SubSource[T, Mat] =
|
||||
new SubSource(delegate.viaAsync(flow))
|
||||
|
||||
/**
|
||||
* Connect this [[SubSource]] to a [[Sink]], concatenating the processing steps of both.
|
||||
* This means that all sub-flows that result from the previous sub-stream operator
|
||||
|
|
@ -1188,6 +1167,12 @@ class SubSource[+Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source
|
|||
def named(name: String): SubSource[Out, Mat] =
|
||||
new SubSource(delegate.named(name))
|
||||
|
||||
/**
|
||||
* Put an asynchronous boundary around this `SubSource`
|
||||
*/
|
||||
def async: SubSource[Out, Mat] =
|
||||
new SubSource(delegate.async)
|
||||
|
||||
/**
|
||||
* Logs elements flowing through the stream as well as completion and erroring.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue