summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/parallel-collections
Commit message (Collapse)AuthorAgeFilesLines
* Fix many typos in docs and commentsmpociecha2014-12-141-1/+1
| | | | | | | | | | | | | This commit corrects many typos found in scaladocs, comments and documentation. It should reduce a bit number of PRs which fix one typo. There are no changes in the 'real' code except one corrected name of a JUnit test method and some error messages in exceptions. In the case of typos in other method or field names etc., I just skipped them. Obviously this commit doesn't fix all existing typos. I just generated in IntelliJ the list of potential typos and looked through it quickly.
* SI-7938 - parallel collections should use default ExecutionContextAleksandar Prokopec2013-10-299-64/+114
| | | | | | | | | | Parallel collections now use `scala.concurrent.ExecutionContext` by default. The `ExecutionContextTaskSupport` is optimized to use the `ForkJoinPool` underlying the `ExecutionContext` if possible. Otherwise, a fallback `TaskSupport` that creates a reduction tree and execute an operation through `Future`s is used.
* Cull extraneous whitespace.Paul Phillips2013-09-1817-194/+194
| | | | | | | | | | | | | | | | | | | | | One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in.
* SI-7349 Partest supports test-interfaceSom Snytt2013-04-301-7/+7
| | | | | | | | Partest uses test-interface API to invoke ScalaCheck. This obviates ad hoc output checking for result status. The context class loader is set to a loader that the scaladoc scalacheck tests can use.
* SI-6968 Simple Tuple patterns aren't irrefutableJason Zaugg2013-01-271-1/+1
| | | | | | | | | | | | Reverts part of c82ecab. The parser can't assume that a pattern `(a, b)` will match, as results of `.isInstanceOf[Tuple2]` can't be statically known until after the typer. The reopens SI-1336, SI-5589 and SI-4574, in exchange for fixing this regression SI-6968. Keeping all of those fixed will require a better definition of irrefutability, and some acrobatics to ensure safe passage to the ambiguous trees through typechecking.
* Rename ConcurrentTrieMap to concurrent.TrieMap.Aleksandar Prokopec2012-03-271-4/+4
| | | | | | | | Introduced the collection.concurrent package and introduced the concurrent.Map trait there. Deprecated the mutable.ConcurrentMap trait. Pending work - introduce the appropriate changes to JavaConversions and JavaConverters.
* Renaming Ctrie to ConcurrentTrieMap.Aleksandar Prokopec2012-03-162-7/+7
|
* Add tasksupport as a configurable field in parallel collections.Aleksandar Prokopec2012-02-231-1/+1
| | | | | | | | | This required a bit of refactoring in the tasks objects and implementations of various operations. Combiners now hold a reference to a tasksupport object and pass it on to their result if `resultWithTaskSupport` is called. Additionally, several bugs that have to do with CanBuildFrom and combiner resolution have been fixed.
* Add tests for parallel Ctrie.Aleksandar Prokopec2012-02-032-0/+101
| | | | Changed parameters in some tests to speed them up.
* Set fields in immutable hash maps and hash sets to vals.aleksandar2012-01-261-15/+15
| | | | | | | | | | This is part of an effort to make the immutable collections (more) thread safe. The `::` still has non-final member fields for head and tail, but there is not much that can be done right now about that, since these fields are used by list buffers. Tried writing a test with unsafe initialization, but could not invent a scenario which actually fails, at least on the JDK6.
* Begone t1737...Hubert Plociniczak2011-11-0216-180/+180
|
* Fixed some tests, renamed from Any to Gen.Aleksandar Pokopec2011-04-131-3/+3
| | | | | No review.
* Refactoring the collections api to support diff...Aleksandar Pokopec2011-04-132-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring the collections api to support differentiation between referring to a sequential collection and a parallel collection, and to support referring to both types of collections. New set of traits Gen* are now superclasses of both their * and Par* subclasses. For example, GenIterable is a superclass of both Iterable and ParIterable. Iterable and ParIterable are not in a subclassing relation. The new class hierarchy is illustrated below (simplified, not all relations and classes are shown): TraversableOnce --> GenTraversableOnce ^ ^ | | Traversable --> GenTraversable ^ ^ | | Iterable --> GenIterable <-- ParIterable ^ ^ ^ | | | Seq --> GenSeq <-- ParSeq (the *Like, *View and *ViewLike traits have a similar hierarchy) General views extract common view functionality from parallel and sequential collections. This design also allows for more flexible extensions to the collections framework. It also allows slowly factoring out common functionality up into Gen* traits. From now on, it is possible to write this: import collection._ val p = parallel.ParSeq(1, 2, 3) val g: GenSeq[Int] = p // meaning a General Sequence val s = g.seq // type of s is Seq[Int] for (elem <- g) { // do something without guarantees on sequentiality of foreach // this foreach may be executed in parallel } for (elem <- s) { // do something with a guarantee that foreach is executed in order, sequentially } for (elem <- p) { // do something concurrently, in parallel } This also means that some signatures had to be changed. For example, method `flatMap` now takes `A => GenTraversableOnce[B]`, and `zip` takes a `GenIterable[B]`. Also, there are mutable & immutable Gen* trait variants. They have generic companion functionality.
* Implementing foreach to work in parallel in Par...Aleksandar Pokopec2011-03-224-4/+4
| | | | | | | | | | | | 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.
* Fixes the broken test, introduced in the view p...Aleksandar Pokopec2011-03-111-8/+12
| | | | | | | Fixes the broken test, introduced in the view patch commit. No review.
* A patch for views. Most relevant change:Paul Phillips2011-03-111-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost all view classes now list parents like trait Appended[B >: A] extends super.Appended[B] with Transformed[B] instead of the former trait Appended[B >: A] extends Transformed[B] with super.Appended[B] because as it was, the implementation of foreach in TraversableViewLike#Transformed was repeatedly trumping overrides found in e.g. IterableLike. This change was not without its own consequences, and much of the rest of the patch is dealing with that. A more general issue is clearly revealed here: there is no straightforward way to deal with trait composition and overrides when some methods should prefer B over A and some the reverse. (It's more like A through Z in this case.) That closes #4279, with some views being five orders of magnitude slower than necessary. There is a test that confirms they'll stay performance neighbors. In the view classes (Zipped, Mapped, etc.) I attended to them with comb and brush until they were reasonably consistent. I only use "override" where necessary and throw in some "final" in the interests of trying to anchor the composition outcome. I also switched the newSliced, newZipped, etc. methods to use early init syntax since a number have abstract vals and I found at least one bug originating with uninitialized access. There was a piece of a parallel collections scalacheck test failing, which I disabled out of expedience - am emailing prokopec. There is plenty of work left to do but paulp must get back to other 2.9 issues. This is the Zurich->SF airplane patch. No review.
* Enabled parallel group by.Aleksandar Pokopec2011-01-101-1/+1
| | | | | No review.
* Implemented a (slower) workaround for parallel ...Aleksandar Pokopec2011-01-076-0/+87
| | | | | | | | Implemented a (slower) workaround for parallel vectors. Implemented group by. No review.
* Minor changes.Aleksandar Pokopec2010-12-091-1/+1
| | | | | No review.
* Made parallel collections serializable.Aleksandar Pokopec2010-12-092-2/+2
| | | | | No review.
* Array combiners implementation changed from arr...Aleksandar Pokopec2010-12-095-41/+58
| | | | | | | | | Array combiners implementation changed from array buffers to doubling unrolled buffers to avoid excessive copying. Still evaluating the benefits of this. No review.
* Fixed parallel ranges to use the same range log...Aleksandar Pokopec2010-12-091-1/+1
| | | | | | | | | | Fixed parallel ranges to use the same range logic under the hood, and not introduce code duplication. Slight fix in Tasks. No review.
* Fixing jvm 1.5 support for parallel collections.Aleksandar Pokopec2010-12-099-32/+85
| | | | | | | | | | | | | | | | | | Special cased with thread pool executor scheduling. Fixed an ugly concurrency bug where futures returned by a thread pool executor didn't remove the task from the queue when cancel was called. Note to self and others: don't cancel futures returned by thread pool executors, it might lead to unexpected behaviour. Modified the executor to add new threads if all the active threads are syncing, in order to avoid deadlocks. Fixed a hidden bug in AdaptiveWorkStealingTasks, where correct behaviour depended on the execution order of the tasks. This didn't fail before with ForkJoinTasks, since there the execution order is well-defined. Scalachecked 1.5 & 1.6 support. No review.
* Refactored parallel collections for pluggable t...Aleksandar Pokopec2010-11-272-13/+15
| | | | | | | | Refactored parallel collections for pluggable task support implementations. No review.
* Disabled a test failing on server.Aleksandar Pokopec2010-11-081-1/+1
| | | | | No review
* Added size maps to flat hash tables.Aleksandar Pokopec2010-11-084-7/+111
| | | | | | | | | | | Added parallel mutable hash sets. Implemented parallel mutable hash set iterators. Implemented parallel mutable hash set combiners. Factored out unrolled linked lists into a separate class UnrolledBuffer, added tests. Added parallel mutable hash set tests, and debugged hashsets. No review.
* Two hashcode-related failing tests fixed.Aleksandar Pokopec2010-10-281-5/+5
| | | | | No review.
* Debugging parallel hash tables.Aleksandar Pokopec2010-10-285-323/+361
| | | | | No review.
* Some serious bugfixes in parallel hash tables.Aleksandar Pokopec2010-10-281-7/+7
| | | | | No review.
* Mostly refactored existing test functionality f...Aleksandar Pokopec2010-10-2810-274/+512
| | | | | | | | Mostly refactored existing test functionality for parallel collections. Added immutable hash set tests. No review.
* Modified remote test.Aleksandar Pokopec2010-10-281-1/+1
| | | | | No review.
* Some serious hash tries bugs fixed.Aleksandar Pokopec2010-10-207-33/+164
| | | | | | | Plus one wild goose chase and test fixes. No review.
* Some exception handling fixes in parallel colle...Aleksandar Pokopec2010-10-206-7/+232
| | | | | | | | Some exception handling fixes in parallel collections. Fixed some regressions. Fixed some tests. No review.
* Reverted a test. No review.Aleksandar Pokopec2010-10-051-2/+2
|
* Added back another previously failing test.Aleksandar Pokopec2010-10-051-2/+2
|
* Disabling a test from last commit until figurin...Aleksandar Pokopec2010-10-051-2/+2
| | | | | | Disabling a test from last commit until figuring out why it fails on the server. No review
* An issue with scalacheck and actors where an ex...Aleksandar Pokopec2010-10-054-413/+416
| | | | | An issue with scalacheck and actors where an excess of thread pools gets created - tmp fix. No review.
* Fixed a scalacheck test group "test entire subd...Aleksandar Pokopec2010-10-0410-0/+1144
| | | | | | | Fixed a scalacheck test group "test entire subdirectory" problem. It's now possible to add scalacheck tests consisting of multiple files. No review.
* Temporarily disabled collections checks to keep...Aleksandar Pokopec2010-09-0110-1164/+0
| | | | | | | Temporarily disabled collections checks to keep build from breaking. No review
* Added scalacheck tests for parallel collections.Aleksandar Pokopec2010-09-0110-0/+1164
Review by phaller (not urgent).