Safe and completely lazy parallel iteration in Scala.
import scala.concurrent.ExecutionContext.Implicits.global
Iterator(1, 2, 3).parMap(_ + 5).toSeq shouldBe Seq(6, 7, 8)
- Evaluate an expression in parallel over an iterator with complete laziness
- Prevent excessive back pressure by blocking on a bounded capacity queue
- All exceptions in the input iterator, or applied function, are raised
- Unlike
iterata
, maximize CPU utilization by avoiding data chunking - Unlike
Future.traverse
, do not accumulate results before emitting them
ivyDeps ++ Agg(ivy"io.cvbio.collection::iterato::0.0.1")
libraryDependencies += "io.cvbio.collection" %% "iterato" % "0.0.1"