From e579152f7329a314607d33c7e3761b769b93518d Mon Sep 17 00:00:00 2001 From: Aleksandar Pokopec Date: Tue, 22 Mar 2011 18:22:25 +0000 Subject: Implementing foreach to work in parallel in Par... Implementing foreach to work in parallel in ParIterableLike. Doing a bunch of refactoring around in the collection framework to ensure a parallel foreach is never called with a side-effecting method. This still leaves other parts of the standard library and the compiler unguarded. No review. --- test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala | 2 +- test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala | 2 +- test/files/scalacheck/parallel-collections/ParallelSeqCheck.scala | 2 +- test/files/scalacheck/parallel-collections/ParallelSetCheck.scala | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'test/files/scalacheck/parallel-collections') diff --git a/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala b/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala index 9ddd5781b9..744d22f05c 100644 --- a/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala +++ b/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala @@ -15,7 +15,7 @@ import scala.collection.parallel._ abstract class ParallelIterableCheck[T](collName: String) extends Properties(collName) with Operators[T] { - type CollType <: ParIterable[T] with Sequentializable[T, Iterable[T]] + type CollType <: ParIterable[T] def values: Seq[Gen[T]] def ofSize(vals: Seq[Gen[T]], sz: Int): Iterable[T] diff --git a/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala b/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala index 6b30f61b57..53e56e9700 100644 --- a/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala +++ b/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala @@ -15,7 +15,7 @@ import scala.collection.parallel._ abstract class ParallelMapCheck[K, V](collname: String) extends ParallelIterableCheck[(K, V)](collname) { - type CollType <: ParMap[K, V] with Sequentializable[(K, V), Map[K, V]] + type CollType <: ParMap[K, V] property("gets iterated keys") = forAll(collectionPairs) { case (t, coll) => diff --git a/test/files/scalacheck/parallel-collections/ParallelSeqCheck.scala b/test/files/scalacheck/parallel-collections/ParallelSeqCheck.scala index 4373157311..3f8a8ad4f5 100644 --- a/test/files/scalacheck/parallel-collections/ParallelSeqCheck.scala +++ b/test/files/scalacheck/parallel-collections/ParallelSeqCheck.scala @@ -17,7 +17,7 @@ import scala.collection.parallel._ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableCheck[T](collName) with SeqOperators[T] { - type CollType <: collection.parallel.ParSeq[T] with Sequentializable[T, Seq[T]] + type CollType <: collection.parallel.ParSeq[T] def ofSize(vals: Seq[Gen[T]], sz: Int): Seq[T] diff --git a/test/files/scalacheck/parallel-collections/ParallelSetCheck.scala b/test/files/scalacheck/parallel-collections/ParallelSetCheck.scala index 092f4823df..56f7832fed 100644 --- a/test/files/scalacheck/parallel-collections/ParallelSetCheck.scala +++ b/test/files/scalacheck/parallel-collections/ParallelSetCheck.scala @@ -15,7 +15,7 @@ import scala.collection.parallel._ abstract class ParallelSetCheck[T](collname: String) extends ParallelIterableCheck[T](collname) { - type CollType <: ParSet[T] with Sequentializable[T, Set[T]] + type CollType <: ParSet[T] property("gets iterated keys") = forAll(collectionPairs) { case (t, coll) => -- cgit v1.2.3