diff --git a/src/System.IO.Pipelines/System/Threading/Scheduler.cs b/src/System.IO.Pipelines/System/Threading/Scheduler.cs index 689949c68ff..a2edfeeafa7 100644 --- a/src/System.IO.Pipelines/System/Threading/Scheduler.cs +++ b/src/System.IO.Pipelines/System/Threading/Scheduler.cs @@ -5,10 +5,10 @@ namespace System.Threading { public abstract class Scheduler { - private static TaskRunScheduler _taskRunScheduler = new TaskRunScheduler(); + private static ThreadPoolScheduler _threadPoolScheduler = new ThreadPoolScheduler(); private static InlineScheduler _inlineScheduler = new InlineScheduler(); - public static Scheduler TaskRun => _taskRunScheduler; + public static Scheduler ThreadPool => _threadPoolScheduler; public static Scheduler Inline => _inlineScheduler; public abstract void Schedule(Action action); diff --git a/src/System.IO.Pipelines/System/Threading/TaskRunScheduler.cs b/src/System.IO.Pipelines/System/Threading/ThreadPoolScheduler.cs similarity index 84% rename from src/System.IO.Pipelines/System/Threading/TaskRunScheduler.cs rename to src/System.IO.Pipelines/System/Threading/ThreadPoolScheduler.cs index 75b355728ca..7a82dd43025 100644 --- a/src/System.IO.Pipelines/System/Threading/TaskRunScheduler.cs +++ b/src/System.IO.Pipelines/System/Threading/ThreadPoolScheduler.cs @@ -6,15 +6,15 @@ namespace System.Threading { - internal sealed class TaskRunScheduler : Scheduler + internal sealed class ThreadPoolScheduler : Scheduler { public override void Schedule(Action action) { #if NETCOREAPP2_1 // Queue to low contention local ThreadPool queue; rather than global queue as per Task - ThreadPool.QueueUserWorkItem(_actionAsTask, action, preferLocal: true); + Threading.ThreadPool.QueueUserWorkItem(_actionAsTask, action, preferLocal: true); #elif NETSTANDARD2_0 - ThreadPool.QueueUserWorkItem(_actionAsTask, action); + Threading.ThreadPool.QueueUserWorkItem(_actionAsTask, action); #else Task.Factory.StartNew(action); #endif @@ -24,9 +24,9 @@ public override void Schedule(Action action, object state) { #if NETCOREAPP2_1 // Queue to low contention local ThreadPool queue; rather than global queue as per Task - ThreadPool.QueueUserWorkItem(_actionObjectAsTask, new ActionObjectAsTask(action, state), preferLocal: true); + Threading.ThreadPool.QueueUserWorkItem(_actionObjectAsTask, new ActionObjectAsTask(action, state), preferLocal: true); #elif NETSTANDARD2_0 - ThreadPool.QueueUserWorkItem(_actionObjectAsTask, new ActionObjectAsTask(action, state)); + Threading.ThreadPool.QueueUserWorkItem(_actionObjectAsTask, new ActionObjectAsTask(action, state)); #else Task.Factory.StartNew(action, state); #endif