Commit Graph
29 Commits
Author SHA1 Message Date
Marek Safar 56cf1b8c2e [corlib] Fixes CancellationTokenSource dispose race 2014-04-01 11:10:50 -07:00
Marek Safar dff86fe824 [corlib] Add missing api 2014-02-27 20:22:12 +01:00
Marek Safar 661af380c3 [corlib] Fixes race in disposing CancellationTokenSource. Fixes #17256 2014-01-17 21:04:08 +01:00
Andrea Canciani 6395563467 Use LIFO policy for CancellationTokenSource
The .NET implementation of CancellationTokenSource invokes the
callbacks in the opposite order from that of the registration.
In order to mixamize compatibility, use the same order.

Fixes ReEntrantRegistrationTest, Cancel_Order, Cancel_ExceptionOrder
(in CancellationTokenSourceTest) and
https://bugzilla.xamarin.com/show_bug.cgi?id=16992
2013-12-31 22:01:46 +01:00
Rodrigo Kumpera 1b92a4148c Since MOBILE implies NET_4_* now, take this into account and simplify our ifdefs. 2013-02-11 18:42:18 -05:00
Jérémie Laval c13bd7df0a [corlib] Remove now unneeded line 2012-07-23 12:59:47 +01:00
Jérémie Laval ca351b61c1 [corlib] Also unregister linked tokens when the proxy CancellationTokenSource becomes cancelled. 2012-07-23 12:54:21 +01:00
Jérémie Laval 75222a62c5 [corlib] Linked token callback to the proxy CancellationTokenSource shouldn't throw ODE in concurrent situations. 2012-07-23 12:48:40 +01:00
Jérémie Laval 253c5fb1d3 [corlib] Dispose linked tokens connections when disposing the resulting CancellationTokenSource
Based on baulig's patch: https://github.com/baulig/mono/commit/3ee4f7600b8efe61f7a701a93fffed8373b7b4b3
2012-07-23 11:48:55 +01:00
Marek Safar d5a78c50c1 Fix CancellationTokenSource cancellation during Dispose 2012-06-11 16:02:39 +01:00
Jeremie Laval b0dcb61630 [corlib] Fix NullRef when using dispose a CancellationTokenRegistration when the initial source has been disposed 2012-05-16 11:50:17 +01:00
Jeremie Laval 7167f57c4d Rework CancellationTokenSource to remove locking. Fix #4173.
Issue reported by MartinG, unit test code based on his repro.
2012-04-10 12:39:03 +01:00
Jeremie Laval ac759e6aa9 Correct CancellationTokenSource locking. Fix #3756. 2012-03-06 10:20:00 +00:00
Marek Safar 0b9bd61dc4 Fix few warnings 2011-11-11 19:03:33 +00:00
Marek Safar 0dcaf11de5 Add optimization for Timeout.Infinite 2011-11-08 19:16:42 +00:00
Marek Safar bd98012400 Fix subtle issues with CancellationTokenSource and implement 4.5 methods 2011-11-07 17:18:26 +00:00
Marek Safar 122d992ec9 CancellationTokenSource is no longer sealed 2011-10-13 17:35:00 +01:00
Marek Safar aeac002518 Make CancellationToken more lightweight and fix few bugs in it 2011-09-22 18:39:40 +01:00
Jérémie Laval 91684170bc Honors correctly canceled ctor parameter of CancellationToken 2011-04-26 16:51:45 +02:00
Geoff Norton 83e999b7d7 Add pfx to the mobile profile 2011-01-25 01:51:17 -05:00
Marek Safar d84d7c7eb9 Remove no longer used BOOTSTRAP conditionals 2010-12-29 12:41:12 +00:00
Jérémie Laval ed404a7b74 More parameter renaming 2010-12-15 16:39:58 +00:00
Jérémie Laval 9f607944a4 [CancellationToken] Speed up ThrowIfCancellationRequested operation 2010-11-17 15:47:27 +00:00
Jérémie Laval 2abec426fe Move NET_4_0 define checks at the right position under the licence text 2010-08-13 16:25:20 +01: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
Miguel de Icaza 9ad0a7c438 Small 4fx fixes
svn path=/trunk/mcs/; revision=145914
2009-11-11 03:15:29 +00:00
Jérémie Laval 2e21472723 2009-08-11 Jérémie Laval <[email protected]>
In build/common/:
   * Consts.cs.in: Add BOOTSTRAP_NET_4_0.

In class/corlib/System.Collections.Concurrent/:
   * ConcurrentQueue.cs:
   * IProducerConsumerCollection.cs: Add BOOTSTRAP_NET_4_0.

In class/corlib/System.Runtime.CompilerServices/:
   * TypeForwardedFromAttribute.cs: Add BOOTSTRAP_NET_4_0.

In class/corlib/System.Threading/:
   * Watch.cs:
   * SpinWait.cs:
   * CountdownEvent.cs:
   * CancellationToken.cs:
   * ICancelableOperation.cs:
   * CancellationTokenSource.cs:
   * CancellationTokenRegistration.cs: Add BOOTSTRAP_NET_4_0.

In class/corlib/System/:
   * Funcs.cs:
   * Action.cs:
   * AggregateException.cs: Add BOOTSTRAP_NET_4_0.

svn path=/trunk/mcs/; revision=139736
2009-08-11 21:10:04 +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 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