Commit Graph
35 Commits
Author SHA1 Message Date
Rodrigo Kumpera 21f79f8d6e Merge pull request #1074 from esdrubal/bug18421
Changed TryPeek to handle race condition with Dequeue.
2014-06-19 11:45:17 -04:00
Zoltan Varga 5006b465ce [bcl] Disable a test added by 3cf55e6016, it depends on precise gc behaviour. 2014-06-03 19:31:09 +02:00
marcos henrich 02aacdb39e Added stress test to ConcurrentQueue.TryPeek.
The test checks that in some race condition the queue does not return null.
2014-05-30 20:22:21 +01:00
Jérémie Laval 610d1e7aaf Merge pull request #1068 from esdrubal/bug18421
Changed ConcurrentQueue to remove last ref/value. Fixes 18421
2014-05-30 14:50:35 -04:00
marcos henrich ff441b11d3 Test ConcurrentDictionary.Contains(KeyValuePair<TKey, TValue>). Covers #16990. 2014-05-30 11:22:01 +01:00
marcos henrich 3cf55e6016 Test that ConcurrentQueue does not keep old references. Covers 18421. 2014-05-29 17:42:10 +01:00
Craig Minihan 7bc35e0a01 Correctly set Count after call to ConcurrentStack.PushRange() 2014-03-05 04:33:54 -08:00
Rodrigo Kumpera 676ef96431 [bcl] Fix test suites. 2014-02-19 14:19:35 -05:00
Simon Hartmann 11b5312c83 Bug 17838 - IDictionary item property implemention for ConcurrentDictionary/SortedList_T throws exception on non-existing key
Avoid double lookup for Dictionary IDictionary.get_Item property impl
2014-02-19 16:40:57 +01:00
Marek Safar 9c787bbc85 [corlib] Add more argument checks to ConcurrentStack 2014-02-05 14:09:11 +01:00
Marek Safar f0f4f4ae51 More mobile tests update 2013-02-14 13:06:49 +01:00
Marek Safar afa79435aa Update for mobile profile 2013-02-07 16:34:21 +01:00
Petr Onderka e8c29f0f16 Check key for null in ConcurrentDictionary 2012-08-20 00:03:31 +02:00
Jeremie Laval f7549a7295 [corlib] Slightly better ToArray/CopyTo methods for ConcurrentStack / ConcurrentQueue 2012-07-26 17:34:23 +01:00
Jeremie Laval 40a84cbe25 [corlib] Fix ConcurrentStack.TryPopRange and add tests. Fix #5304 2012-05-24 19:05:57 +01:00
Jeremie Laval b082c17865 Fix #3639
The search code was taking care of hash collision for different objects inside the collection but it didn't handle properly the case where the supplied search key has the same hash than a different object inside the collection.
2012-03-01 13:05:33 +01:00
Marek Safar 88fde5a568 Add VS project files for test project 2012-02-10 14:56:23 +00:00
Jérémie Laval b2fb65cde6 Fix double adding in ConcurrentDictionary ctor with IEnumerable seed. 2011-09-25 11:23:43 +02:00
Jérémie Laval 011503ddaf Remove now unused internal classes 2011-01-07 13:50:32 +00:00
Jérémie Laval 1e9443a9b6 Use correct exception when a key is not found in ConcurrentDictionary 2011-01-04 17:37:49 +00:00
Jérémie Laval 09185b9e81 Add support for storing elements with the same hashcode in ConcurrentDictionary. Add corresponding unit test. 2010-12-16 13:39:32 +00:00
Jérémie Laval 90e64cabf9 Implement Partitioner.Create int and long overloads. Add corresponding unit tests. 2010-11-03 17:41:06 +00:00
Jérémie Laval 483b2986db Allow at max one Remove operation to fail in tests.
Some concurrent collections don't necessarily guarantee that a call to Dequeue/Pop/equivalent will succeed even in the case there are elements in the collection. When one of such operation fail in test, retry it immediately to check for that sort of cases.
2010-08-27 15:03:39 +01:00
Jérémie Laval b7fca3da5a Add additional unit test for ConcurrentDictionary to validate behavior with the new SplitOrderedList backend. 2010-08-12 13:30:01 +01:00
Jérémie Laval fe983225ad 2010-06-03 Jérémie Laval <[email protected]>
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
2010-06-03 16:51:22 +00:00
Jérémie Laval d497b64f3d 2010-03-24 Jérémie Laval <[email protected]>
In class/corlib/System.Collections.Concurrent/:
   * ConcurrentDictionary.cs: Enable tracking on SpinLock
   * ConcurrentSkipList.cs: Use Spinlock instead of Monitor and
   refactor to use a saner lock acquiring scheme.

In class/corlib/Test/System.Collections.Concurrent/:
   * ConcurrentDictionaryTests.cs: Renaming in Assert

svn path=/trunk/mcs/; revision=154165
2010-03-24 19:26:00 +00:00
Jérémie Laval 8c1c45ab02 2010-03-24 Jérémie Laval <[email protected]>
In class/corlib/System.Collections.Concurrent/:
   * ConcurrentDictionary.cs: Use SpinLock instead of Monitor
   for basket locking

In class/corlib/Test/System.Collections.Concurrent/:
   * ConcurrentDictionaryTests.cs: Update behavior of TryAddDuplicateTest
   The method returns false and doesn't throw exception anymore

svn path=/trunk/mcs/; revision=154138
2010-03-24 13:39:43 +00:00
Jérémie Laval e531fc2677 2010-02-02 Jérémie Laval <[email protected]>
In class/corlib/:
   * corlib.dll.sources: Add System.Threading.Tasks/SimpleConcurrentBag.cs
   and System.Threading.Tasks/UnobservedTaskExceptionEventArgs.cs

In class/corlib/System.Collections.Concurrent/:
   * ConcurrentDictionary.cs:
   * ConcurrentQueue.cs:
   * ConcurrentStack.cs:
   * Partitioner.cs: Port to .NET 4 beta 2 API
   * ConcurrentSkipList.cs: Use Monitor for locking

In class/corlib/System.Threading.Tasks/:
   * Future.cs:
   * Parallel.cs:
   * ParallelLoopState.cs:
   * Task.cs:
   * TaskCompletionSource.cs:
   * TaskContinuationOptions.cs:
   * TaskCreationOptions.cs:
   * TaskFactory.cs:
   * TaskScheduler.cs:
   * UnobservedTaskExceptionEventArgs.cs: Port to .NET 4 beta 2 API
   * SimpleConcurrentBag.cs: Add a simpler implementation of ConcurrentBag
   for use with parallel loops as ConcurrentBag was moved to System

In class/corlib/System.Threading/:
   * CancellationToken.cs:
   * CancellationTokenSource.cs:
   * ManualResetEventSlim.cs:
   * SemaphoreSlim.cs:
   * SpinLock.cs:
   * SpinWait.cs:
   * ThreadLocal.cs: Port to .NET 4 beta 2 API

In class/corlib/System/:
   * AggregateException.cs:
   * OperationCanceledException.cs: Port to .NET 4 beta 2 API

In class/corlib/Test/System.Collections.Concurrent/:
   * CollectionStressTestHelper.cs:
   * ConcurrentBagTests.cs:
   * ConcurrentDictionaryTests.cs:
   * ConcurrentQueueTests.cs:
   * ConcurrentSkipListTests.cs:
   * ConcurrentStackTests.cs:
   * ParallelConcurrentQueueTests.cs:
   * ParallelConcurrentStackTests.cs: Update namespaces and tested methods

In class/corlib/Test/System.Threading.Tasks/:
   * FutureTests.cs:
   * ParallelTestHelper.cs:
   * ParallelTests.cs:
   * SnziTests.cs:
   * TaskCompletionSourceTests.cs:
   * TaskTest.cs: Update namespace and tested methods

In class/corlib/Test/System.Threading/:
   * CancellationTokenTests.cs:
   * LazyInitTests.cs:
   * ThreadLazyTests.cs: Update namespace and tested methods

svn path=/trunk/mcs/; revision=150716
2010-02-02 17:06:15 +00:00
Marek Safar afd70eb8a8 Fixes 4.0 build
svn path=/trunk/mcs/; revision=146130
2009-11-13 13:19:05 +00:00
Jérémie Laval 9bf30cecff 2009-08-11 Jérémie Laval <[email protected]>
* 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
2009-08-11 18:47:31 +00:00
Jérémie Laval 6edd2683c2 2009-08-05 Jérémie Laval <[email protected]>
In class/corlib/System.Threading.Tasks/:
	* Future.cs: Fix for Future, when using TaskCompletionSource
	don't try to run Wait before returning value

In class/corlib/Test/System.Collections.Concurrent/:
	* ConcurrentDictionaryTests.cs: Re-enable ConcurrentDictionary unit
	tests.

svn path=/trunk/mcs/; revision=139402
2009-08-05 15:02:40 +00:00
Raja R Harinath 27813e51ba * ParallelConcurrentQueueTests.cs (CountTestCase): Remove call to internal method.
svn path=/trunk/mcs/; revision=139349
2009-08-04 15:18:07 +00:00
Jérémie Laval 7baa3c7178 In class/corlib/:
* corlib.dll.sources: Added TaskCompletionSource
        * corlib_test.dll.sources: Removed SnziTests due to
		visibility change in Snzi.
        Added TaskCompletionSource tests.

In class/corlib/System.Collections.Concurrent/:
        * ConcurrentBag.cs:
        * ConcurrentQueue.cs:
        * ConcurrentStack.cs:
        * ConcurrentSkipList.cs:
        * ConcurrentDictionary.cs:
        * IProducerConsumerCollection.cs: Make the namespace comply to 4.0b1

In class/corlib/System.Threading.Tasks/:
        * Task.cs:
        * Future.cs:
        * TaskFactory.cs:
        * TaskCanceledException.cs:
        * TaskSchedulerException.cs:
        * Internal/SchedulerProxy.cs: Make System.Threading.Tasks API fully 4.0 b1 compliant.
        * TaskCompletionSource.cs: Add TaskCompletionSource class

In class/corlib/System.Threading/:
        * Snzi.cs:
        * Parallel.cs:
        * SpinLock.cs:
        * SpinWait.cs:
        * ThreadLocal.cs:
        * SemaphoreSlim.cs:
        * CountdownEvent.cs:
        * ManualResetEventSlim.cs:
        * CancellationTokenSource.cs: Various 4.0 b1 API mismatch fixes.

In class/corlib/Test/System.Collections.Concurrent/:
        * ConcurrentDictionary: Ignore tests until runtime/compiler
        is fixed

svn path=/trunk/mcs/; revision=139206
2009-07-31 18:08:49 +00:00
Jérémie Laval 58e13b8909 * Fix System.Collections.Concurrent API mismatches
* Update unit tests with the modified API

svn path=/trunk/mcs/; revision=139172
2009-07-31 12:36:18 +00:00
Jérémie Laval b5d889b654 Author: Jérémie Laval <[email protected]>
Date:   Thu Jul 30 15:37:21 2009 +0200

First code drop of ParallelFx.

svn path=/trunk/mcs/; revision=139083
2009-07-30 13:56:32 +00:00