Commit Graph
33 Commits
Author SHA1 Message Date
Marek Safar 395cf8f623 [corlib] Add check for launching cancelled task to all overloads 2013-12-07 19:51:35 +01:00
Marek Safar ee5939881d Fixed TaskFactory::ContinueWhenAny with func result. Fixes #14839 2013-09-20 19:41:15 +02: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
Marek Safar 5b9a3f9e9a Remove unused parameter 2012-04-11 10:01:17 +01:00
Jeremie Laval a221409ade Use .NET 4.5 implementation of Task's WhenAll/WhenAny for TaskFactory's ContinueWhenAll/ContinueWhenAny
The diff noise in Task.cs is just moving WhenAllCore and WhenAnyCore outside of their NET_4_5 region
2012-04-10 16:37:25 +01:00
Jeremie Laval 790411c617 Better argument checking in TaskFactory's ContinueWhen* methods 2012-04-10 16:37:25 +01:00
Marek Safar 596a6c5542 Implement ContinueWhenAny/ContinueWhenAll with less temporary tasks 2011-10-21 16:26:11 +01:00
Marek Safar 469ad8cb81 Setup await continuation without extra task 2011-10-21 15:49:44 +01:00
Marek Safar 598fecce9b Don't create wrapper anonymous method for Task.Factory.StartNew 2011-10-21 15:49:43 +01:00
Marek Safar adb5835775 Create Task continuation with less intermediate delegates 2011-10-21 10:00:53 +01:00
Marek Safar 675aacc20f Fix wrong conditional 2011-10-12 12:29:17 +01:00
Marek Safar 1c5222f0f5 Don't start cancelled task when using task factory. Fixes #1104 2011-10-12 12:24:06 +01:00
Jérémie Laval 48a5bbeb93 Use a TaskCompletionSource in non-generic ContinueWhenAny case. Fix #647. 2011-09-06 23:54:11 +02:00
Marek Safar 644a44c896 Implement properly TaskFactory::FromAsync 2011-09-01 13:26:51 +01:00
Marek Safar 33d931c95b Check TaskFactory continuation options 2011-08-24 15:00:52 +01:00
Marek Safar 5609133d71 Split TaskFactory.cs file 2011-08-19 16:42:32 +01:00
Jérémie Laval 3c19080f53 Implement TaskFactory.FromAsync 2011-02-15 13:26:02 +00:00
Jérémie Laval 30cc982eb8 Avoid wrapping task body given as Action into Action<object> 2011-02-02 17:08:39 +00:00
Geoff Norton 83e999b7d7 Add pfx to the mobile profile 2011-01-25 01:51:17 -05:00
Jérémie Laval f91a01c747 Sanitize parent-child relation in continuations 2011-01-24 14:26:17 +00:00
Marek Safar d84d7c7eb9 Remove no longer used BOOTSTRAP conditionals 2010-12-29 12:41:12 +00:00
Jérémie Laval 15e3272b1c Clean and finish TaskFactory 2010-12-16 14:45:44 +00:00
Jérémie Laval ed404a7b74 More parameter renaming 2010-12-15 16:39:58 +00:00
Rodrigo Kumpera a5a1271ae2 Fix typo 2010-11-26 15:42:05 -02:00
Jérémie Laval 057b5e88d7 [Task] In every TaskFactory method accepting a Task array, we have to make a private copy to avoid changes to the array content from the moment we register the continuation to when we call the callback 2010-11-26 16:54:38 +00:00
Jérémie Laval 3025b41c62 Fix cancellation tracking and reporting in Task. 2010-08-18 14:34:07 +01: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 0d765d035d 2010-04-15 Jérémie Laval <[email protected]>
In class/System/System.Collections.Concurrent/:
   * BlockingCollection.cs:
   * ConcurrentBag.cs: Add BOOTSTRAP_NET_4_0

In class/System/System.Threading/:
   * Barrier.cs: Add BOOTSTRAP_NET_4_0

In class/corlib/System.Collections.Concurrent/:
   * ConcurrentDictionary.cs:
   * ConcurrentSkipList.cs:
   * OrderablePartitioner.cs:
   * Partitioner.cs: Add BOOTSTRAP_NET_4_0 define

In class/corlib/System.Collections/:
   * IStructuralComparable.cs:
   * IStructuralEquatable.cs: Add BOOTSTRAP_NET_4_0 define

In class/corlib/System.Threading.Tasks/:
   * Future.cs:
   * Task.cs:
   * TaskCanceledException.cs:
   * TaskContinuationOptions.cs:
   * TaskCreationOptions.cs:
   * TaskFactory.cs:
   * TaskScheduler.cs:
   * TaskStatus.cs: Add BOOTSTRAP_NET_4_0 define

In class/corlib/System.Threading/:
   * AtomicBoolean.cs:
   * CountdownEvent.cs:
   * SpinLock.cs: Add BOOTSTRAP_NET_4_0 define

In class/corlib/System/:
   * Tuple.cs:
   * Tuples.cs: Add BOOTSTRAP_NET_4_0 define

svn path=/trunk/mcs/; revision=155531
2010-04-15 19:01:26 +00:00
Jérémie Laval b4db6246d1 2010-03-02 Jérémie Laval <[email protected]>
In class/System/:
   * System_test.dll.sources: Add System.Threading/BarrierTest.cs

In class/System/System.Threading/:
   * Barrier.cs: Remove dead comments

In class/System/Test/System.Threading/:
   * BarrierTest.cs: Add BarrierTest.

In class/corlib/:
   * corlib_test.dll.sources: Add System.Threading.Tasks/TaskFactoryTest.cs

In class/corlib/System.Threading.Tasks/:
   * Task.cs: If we add a continuation when the Task is already finished
   forces its schedule as a Task instead of executing on the calling thread.
   * TaskFactory.cs: Add ContinueWhenAny implementation when returning Task

In class/corlib/Test/System.Threading.Tasks/:
   * TaskFactoryTest.cs: Add TaskFactoryTests
   * TaskTest.cs: Re-enable TastTest

svn path=/trunk/mcs/; revision=152884
2010-03-02 23:01:28 +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
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 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