clintval / iterato   0.0.1

MIT License GitHub

Safe and completely lazy parallel iteration in Scala

Scala versions: 2.13

iterato

Unit Tests Coverage Status Language

Safe and completely lazy parallel iteration in Scala.

Fish Lake, Washington

Examples

import scala.concurrent.ExecutionContext.Implicits.global

Iterator(1, 2, 3).parMap(_ + 5).toSeq shouldBe Seq(6, 7, 8)

Features

  • 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

If Mill is your build tool

ivyDeps ++ Agg(ivy"io.cvbio.collection::iterato::0.0.1")

If SBT is your build tool

libraryDependencies += "io.cvbio.collection" %% "iterato" % "0.0.1"