Because it is syntactically simpler.
val tasks: Seq[() => T] = ??? val futures = tasks map { t => future { t() } } val results: Future[Seq[T]] = Future.sequence(futures)
In future results you can wait using Await.result , or you can display it even more / use it for understanding or set callbacks on it.
Compare this to creating an instance of all participants by sending them messages, encoding their receive blocks, receiving responses from them and disabling them, which usually requires more templates.
axel22
source share