Created
December 20, 2015 02:59
-
-
Save blizzarddreams/aebd9d95dbd8a1f68742 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scala.concurrent._ | |
| import ExecutionContext.Implicits.global | |
| import scala.concurrent.duration._ | |
| object Dog extends App { | |
| def go() = { | |
| val futures = List( | |
| Future { for(i <- 1 to 10) println("A")}, | |
| Future { for(i <- 1 to 10) println("B")}, | |
| Future { for(i <- 1 to 10) println("C")} | |
| ) | |
| Future.sequence(futures) | |
| } | |
| Await.result(go, Duration.Inf) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment