Merge pull request #16721 from ktoso/runOps-ktoso
!str #16563 terminal operations start with run*; runFold runForeach
This commit is contained in:
commit
9c9984aaf9
24 changed files with 58 additions and 57 deletions
|
|
@ -45,7 +45,7 @@ trait Source[+Out] extends FlowOps[Out] with Materializable {
|
|||
* function evaluation when the input stream ends, or completed with `Failure`
|
||||
* if there is an error is signaled in the stream.
|
||||
*/
|
||||
def fold[U](zero: U)(f: (U, Out) ⇒ U)(implicit materializer: FlowMaterializer): Future[U] = runWith(FoldSink(zero)(f)) // FIXME why is fold always an end step?
|
||||
def runFold[U](zero: U)(f: (U, Out) ⇒ U)(implicit materializer: FlowMaterializer): Future[U] = runWith(FoldSink(zero)(f)) // FIXME why is fold always an end step?
|
||||
|
||||
/**
|
||||
* Shortcut for running this `Source` with a foreach procedure. The given procedure is invoked
|
||||
|
|
@ -54,7 +54,7 @@ trait Source[+Out] extends FlowOps[Out] with Materializable {
|
|||
* normal end of the stream, or completed with `Failure` if there is an error is signaled in
|
||||
* the stream.
|
||||
*/
|
||||
def foreach(f: Out ⇒ Unit)(implicit materializer: FlowMaterializer): Future[Unit] = runWith(ForeachSink(f))
|
||||
def runForeach(f: Out ⇒ Unit)(implicit materializer: FlowMaterializer): Future[Unit] = runWith(ForeachSink(f))
|
||||
|
||||
/**
|
||||
* Concatenates a second source so that the first element
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue