package parallelizer
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- parallelizer
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
- implicit class ParallelIterator[T] extends AnyRef
- implicit class ParallelSeq[T] extends AnyRef
Value Members
-
object
Parallel
Provides tiny utilities for parallelization.
Provides tiny utilities for parallelization.
For example, each element of source is proceeded in parallel in the following example.
val source: Seq[Int] = Seq(1, 2, 3) val result: Seq[Int] = Parallelizer.run(source){ i => ... }
Parallelism can be specified as a second parameter. The default value is a number of available processors.
val result: Seq[Int] = Parallelizer.run(source, 100){ i => ... }
You can use
Iterator
instead ofSeq
as a source. This version is useful to handle a very large data.val source: Iterator[Int] = ... val result: Iterator[Int] = Parallelizer.iterate(source){ i => ... }