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
|
|
@ -205,7 +205,7 @@ class Source[+Out](delegate: scaladsl.Source[Out]) {
|
|||
* 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: japi.Function2[U, Out, U], materializer: FlowMaterializer): Future[U] =
|
||||
def runFold[U](zero: U, f: japi.Function2[U, Out, U], materializer: FlowMaterializer): Future[U] =
|
||||
runWith(Sink.fold(zero, f), materializer)
|
||||
|
||||
/**
|
||||
|
|
@ -223,7 +223,7 @@ class Source[+Out](delegate: scaladsl.Source[Out]) {
|
|||
* normal end of the stream, or completed with `Failure` if there is an error is signaled in
|
||||
* the stream.
|
||||
*/
|
||||
def foreach(f: japi.Procedure[Out], materializer: FlowMaterializer): Future[Unit] =
|
||||
def runForeach(f: japi.Procedure[Out], materializer: FlowMaterializer): Future[Unit] =
|
||||
runWith(Sink.foreach(f), materializer)
|
||||
|
||||
// COMMON OPS //
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue