The reasoning behind doing CAS on longs was to avoid overflowing
which is not a problem because 2-completement math does the trick.
This is much more reliable than using longs on 32 bits.
ConcurrentDictionary is now used to store the per-thread CyclicDeque instances instead of maintaining a growing array ourselves. Add hints are still used.
In class/System/System.Collections.Concurrent/:
* ConcurrentBag.cs: Add a add hint cache for faster steal retrieval.
Initialize lazily the underlying CyclicDeque.
In class/corlib/Test/System.Collections.Concurrent/:
* CollectionStressTestHelper.cs: Bump remove test repeat to 1000.
Use a local variable for tracking status and only update the global one
at the end.
svn path=/trunk/mcs/; revision=158417
In class/System/System.Collections.Concurrent/:
* BlockingCollection.cs: Rewrite to use a transaction id
based approach. Ported to 4.0 API. Fix GetConsumingEnumerable.
In class/System/Test/System.Collections.Concurrent/:
* BlockingCollectionTests.cs: Track API changes.
In class/System/System.Threading/:
* Barrier.cs: Fix Barrier to be really thread-safe.
Remove deadlocking.
In class/corlib/System.Collections.Concurrent/:
* Partitioner.cs: Fix infinite recursion when calling Create
with a IList.
* Partitionners/ListPartitioner.cs: Fix bad splitting for the
last partition.
In class/corlib/System.Threading.Tasks/:
* Task.cs: Refactor Wait methods.
In class/corlib/System.Threading/:
* AtomicBoolean.cs: Turn it into a class
* CountdownEvent.cs: Work on cached variable. Make sure
count doesn't go under 0.
* ParallelLoopState.cs: Initialize correctly AtomicBoolean.
svn path=/trunk/mcs/; revision=140229
* Update unit tests
* Moved BlockingCollection and Barrier in System.dll (with assorted fixes)
* Fix wrong signature in TaskFactory<T>
* Update .dll.sources files
* Move AggregateException in System namespace
* Remove While in Parallel
* Correct Wait(CancellationToken) signature in CountdownEvent
* update corlib.dll.sources
svn path=/trunk/mcs/; revision=139727