!str #19732 Concise and consistent way to mark async boundaries

This commit is contained in:
Johan Andrén 2016-02-10 13:56:38 +01:00
parent d154fad4e9
commit 4e49d75ad8
25 changed files with 125 additions and 194 deletions

View file

@ -84,29 +84,6 @@ class SubFlow[-In, +Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flo
def via[T, M](flow: Graph[FlowShape[Out, T], M]): SubFlow[In, T, Mat] =
new SubFlow(delegate.via(flow))
/**
* Transform this [[Flow]] by appending the given processing steps, ensuring
* that an `asyncBoundary` attribute is set around those steps.
*
* {{{
* +----------------------------+
* | Resulting Flow |
* | |
* | +------+ +------+ |
* | | | | | |
* In ~~> | this | ~Out~> | flow | ~~> T
* | | | | | |
* | +------+ +------+ |
* +----------------------------+
* }}}
*
* The materialized value of the combined [[Flow]] will be the materialized
* value of the current flow (ignoring the other Flows value), use
* [[Flow#viaMat viaMat]] if a different strategy is needed.
*/
def viaAsync[T, M](flow: Graph[FlowShape[Out, T], M]): SubFlow[In, T, Mat] =
new SubFlow(delegate.viaAsync(flow))
/**
* Connect this [[SubFlow]] to a [[Sink]], concatenating the processing steps of both.
* This means that all sub-flows that result from the previous sub-stream operator
@ -1191,6 +1168,12 @@ class SubFlow[-In, +Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flo
def named(name: String): SubFlow[In, Out, Mat] =
new SubFlow(delegate.named(name))
/**
* Put an asynchronous boundary around this `SubFlow`
*/
def async: SubFlow[In, Out, Mat] =
new SubFlow(delegate.async)
/**
* Logs elements flowing through the stream as well as completion and erroring.
*