From f8b3c4142f2f204c126afe77062e97bec3cb9888 Mon Sep 17 00:00:00 2001 From: Rodrigo Kumpera Date: Thu, 13 Jun 2013 18:37:13 -0400 Subject: [PATCH] Kill some unused code that is a leftover from when TPL had a managed scheduler. --- mcs/class/corlib/System.Threading.Tasks/Task.cs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/mcs/class/corlib/System.Threading.Tasks/Task.cs b/mcs/class/corlib/System.Threading.Tasks/Task.cs index f85d509f41c..54a9d9be322 100644 --- a/mcs/class/corlib/System.Threading.Tasks/Task.cs +++ b/mcs/class/corlib/System.Threading.Tasks/Task.cs @@ -46,8 +46,6 @@ namespace System.Threading.Tasks // and for Parent property. [System.ThreadStatic] static Task current; - [System.ThreadStatic] - static Action childWorkAdder; // parent is the outer task in which this task is created readonly Task parent; @@ -371,18 +369,7 @@ namespace System.Threading.Tasks internal void Schedule () { Status = TaskStatus.WaitingToRun; - - // If worker is null it means it is a local one, revert to the old behavior - // If TaskScheduler.Current is not being used, the scheduler was explicitly provided, so we must use that - if (scheduler != TaskScheduler.Current || childWorkAdder == null || HasFlag (creationOptions, TaskCreationOptions.PreferFairness)) { - scheduler.QueueTask (this); - } else { - /* Like the semantic of the ABP paper describe it, we add ourselves to the bottom - * of our Parent Task's ThreadWorker deque. It's ok to do that since we are in - * the correct Thread during the creation - */ - childWorkAdder (this); - } + scheduler.QueueTask (this); } void ThreadStart () -- 2.11.4.GIT