Marek Safar
f39cc88e58
[corlib] Notify parent task when child task uses NotOnFaulted. Fixes #23594
2014-10-05 14:36:05 -04:00
Marek Safar
ebcc2ee853
[corlib] Task never is CompletedSynchronously
2014-08-20 12:01:42 +02:00
Marek Safar
b3c6f228b3
[corlib] Fix extra await context switch when custom SynchronizationContext does not change. Fixes #17878
2014-04-25 18:03:43 +02:00
Marek Safar
a10df86558
[corlib] Better checks for release of parent task
2014-04-08 15:31:53 +02:00
BrandonLWhite
5e5f3a19fd
Fixed memory leak in Task when child tasks are continually created.
...
This resolves bug # 18398 and other OOM scenarios in long running applications that make use of FromAsync, ContinueWith, etc. to "rearm" asynchronous operations.
2014-04-08 15:31:52 +02:00
Marek Safar
4b4ddb66b3
[corlib] Improve flow of ExecutionContext (few tests taken from https://github.com/mono/mono/pull/864 ). Fixes #18121 and similar.
2014-03-06 19:54:06 +01:00
Marek Safar
1383b1834d
[corlib] Better recovery when tasks run on broken scheduler
2014-02-06 18:08:37 +01:00
Marek Safar
8f1a0ccce6
[corlib] Improve 85aaf9b074 change
2014-01-14 19:23:23 +01:00
Marek Safar
75bc8d1e1d
[corlib] Hunting down rare Task.WaitAll race
2014-01-10 14:38:35 +01:00
Marek Safar
e83bf13866
[corlib] Mark all promise-style task exceptions observed. Fixes #17015
2014-01-06 17:52:19 +01:00
Marek Safar
99aa6cf9b2
[corlib] Promise style tasks cannot be started manually. Fixes #16857
2014-01-02 14:13:00 +01:00
Marek Safar
01b7a50189
[corlib] Don't inline await continuations when the context does not allow it. Fixes #16548
2013-12-13 17:09:24 +01:00
Marek Safar
de61f61d53
[corlib] Keep original cancellation exception from awaited task
2013-12-08 10:42:12 +01:00
Marek Safar
85aaf9b074
[corlib] Better handling of awaiter continuation on finished task
2013-12-07 19:51:36 +01:00
Marek Safar
395cf8f623
[corlib] Add check for launching cancelled task to all overloads
2013-12-07 19:51:35 +01:00
Marek Safar
3b664f331f
[corlib] Implement task awaiters running on custom task scheduler. Fixes #16587
2013-12-05 09:51:56 +01:00
Marek Safar
a2850fc7da
Merge pull request #799 from kebby/master
...
Task.WhenAllCore<T> now handles empty argument list correctly. Fixes #15956
2013-11-12 00:38:48 -08:00
Tammo 'kb' Hinrichs
9fce6c603c
Return empty result array when calling Task.WhenAllCore<T> with empty argument list. Fixes #15956
2013-11-06 13:21:47 +01:00
Marek Safar
5d96c0de63
Simplify work item registration for internal work items
2013-10-09 12:51:16 +02:00
Marek Safar
e5bd8bc98b
Release continuation ancestor before running. Fixes #15036
2013-10-09 10:43:41 +02:00
Marek Safar
cf2ac2171b
Make Task.Delay more reliable. Fixes #14585
2013-10-08 10:16:19 +02:00
Marek Safar
ee5939881d
Fixed TaskFactory::ContinueWhenAny with func result. Fixes #14839
2013-09-20 19:41:15 +02:00
Rodrigo Kumpera
0acb81dc64
[bcl] Replace more long fields with int to make them CAS friendly on 32 bits systems.
2013-09-04 14:47:27 -04:00
Marek Safar
6508d62869
Grow underlying buffer only when necessary. Fixes #13552
2013-08-17 16:31:45 +02:00
Marek Safar
354027fe22
Schedule internal delay task on default scheduler only. Fixes #13318
2013-07-20 09:18:58 +02:00
Marek Safar
b65deac489
Remove redundant status capturing
2013-07-16 10:13:27 +02:00
Marek Safar
20aaf27c90
Fixes scheduling of non-inlined sychronous continuations.
2013-07-16 10:00:15 +02:00
Marek Safar
7e7134d3c6
Block task awaiter until task completes. Fixes #12745
2013-06-27 16:02:07 +02:00
Rodrigo Kumpera
f8b3c4142f
Kill some unused code that is a leftover from when TPL had a managed scheduler.
2013-06-13 18:50:01 -04:00
Marek Safar
8b7cf63dd3
Implement Task::AsyncWaitHandle. Fixes #12342
2013-05-23 11:11:25 +02:00
Marek Safar
46fc054c3f
Remove internal continuations from unfinished tasks used in WhenAny, Fixes #11008
2013-03-18 09:33:06 +01:00
Marek Safar
8e318f410b
Break direct TPL dependency from stream classes
2013-02-16 13:15:52 +01:00
Marek Safar
c1437f237f
Fix TaskCreationOptions.AttachedToParent to avoid NRE on TaskCreationOptions.DenyChildAttach and deadlock on Wait
2013-02-12 14:25:58 +01:00
Marek Safar
65518ad2ca
RunSynchronously cannot be used with continuation
2013-02-12 14:25:58 +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
Marek Safar
bc9310d661
Make Is64BitProcess internal to avoid mobile define
2013-01-17 17:57:11 +01:00
Marek Safar
f8384a1e3b
Duplicate less mscorlib code in System.Core
2013-01-03 18:40:02 +01:00
Marek Safar
5b177dfc0a
Run async continuation without allocating temporary hoisting classes.
2013-01-03 18:40:01 +01:00
Marek Safar
8d95b42b23
Remove unused class
2013-01-03 18:40:01 +01:00
Jeremie Laval
ddd2e48fba
[corlib] Fix MaxConcurrencyLevel and MaxDegreeOfParallelism usage. Fix OOM error introduced in 1f246742d8.
2012-11-26 16:48:26 +00:00
Jeremie Laval
9dd091fb0a
[corlib] Pass the right scheduler for worker number calculation. Fix #8559 .
2012-11-26 12:12:54 +00:00
Marek Safar
1f246742d8
Fix MaximumConcurrencyLevel. Fixes #8557
2012-11-23 12:42:33 +01:00
Jeremie Laval
94f551d463
[corlib] Protect against multiple invocation of FromAsync result code. Fix #7965 .
...
For some weird reason, it seems the end callback can be called multiple times by some async result.
2012-11-16 11:36:41 +00:00
Jeremie Laval
e7f4360ad3
[corlib] Fix unobserved exception being mistakenly propagated to finalizer thread when using ContinueWhenAll.
...
The problem was that we internally use Task.WhenAll inside TaskFactory.ContinueWhenAll to merge the given tasks into one that we can Continue on to run the passed arguments.
However, the behavior of WhenAll is to collect the exceptions that happened on its parent tasks and to set the aggregate on itself which was not catched by our continuation internally, leading to the exception remaining unobserved and escalating to the finalizer thread.
2012-11-15 15:01:32 +00:00
Martin Baulig
e3bd9da840
Fix TaskFactory::FromAsync for methods that completed synchronously.
...
Don't call InnerInvoke() a 2nd time if the 'Begin' method that
completed synchronously already invoked the callback.
2012-10-25 21:55:33 +02:00
Marek Safar
7c3708d2ba
Implement TaskFactory::FromAsync for calls completed synchronously.
2012-10-02 17:03:15 +01:00
Jeremie Laval
077589883d
[corlib] Fix 4.0 build
2012-09-24 16:28:49 +01:00
Jeremie Laval
3b2d269943
[corlib] Fix build
2012-09-24 16:19:56 +01:00
Jeremie Laval
5877a9423b
[corlib] Honor LazyCancellation flag
2012-09-24 12:28:25 +01:00
Jeremie Laval
2de1ee29c8
[corlib] Honor HideScheduler flag
2012-09-24 11:47:06 +01:00