!str #16563 terminal operations start with run*; runFold runForeach
This commit is contained in:
parent
af4555ce1f
commit
39038597b2
24 changed files with 58 additions and 57 deletions
|
|
@ -92,7 +92,7 @@ class TwitterStreamQuickstartDocSpec extends AkkaSpec {
|
|||
//#authors-foreachsink-println
|
||||
|
||||
//#authors-foreach-println
|
||||
authors.foreach(println)
|
||||
authors.runForeach(println)
|
||||
//#authors-foreach-println
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ class TwitterStreamQuickstartDocSpec extends AkkaSpec {
|
|||
val completion: Future[Unit] =
|
||||
Source(1 to 10)
|
||||
.map(i => { println(s"map => $i"); i })
|
||||
.foreach { i => readLine(s"Element = $i; continue reading? [press enter]\n") }
|
||||
.runForeach { i => readLine(s"Element = $i; continue reading? [press enter]\n") }
|
||||
|
||||
Await.ready(completion, 1.minute)
|
||||
//#backpressure-by-readline
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue