Delete RuntimeThread.cs (dotnet/coreclr#23532)
authorJan Kotas <jkotas@microsoft.com>
Fri, 29 Mar 2019 06:00:53 +0000 (23:00 -0700)
committerGitHub <noreply@github.com>
Fri, 29 Mar 2019 06:00:53 +0000 (23:00 -0700)
No longer needed

Commit migrated from https://github.com/dotnet/coreclr/commit/b1b8718355a687c7223de9f4a45e10937d2bf3f1

src/libraries/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeThread.cs [deleted file]
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems

diff --git a/src/libraries/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeThread.cs b/src/libraries/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeThread.cs
deleted file mode 100644 (file)
index 5e811c0..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Diagnostics;
-using System.Runtime.CompilerServices;
-using System.Runtime.ConstrainedExecution;
-using System.Runtime.InteropServices;
-using System.Security;
-using System.Threading;
-
-namespace Internal.Runtime.Augments
-{
-    public class RuntimeThread : CriticalFinalizerObject
-    {
-        private Thread _thread;
-        [ThreadStatic]
-        private static RuntimeThread t_currentThread;
-
-        private RuntimeThread(Thread thread)
-        {
-            _thread = thread;
-        }
-
-        public static RuntimeThread Create(ThreadStart start) => new RuntimeThread(new Thread(start));
-        public static RuntimeThread Create(ThreadStart start, int maxStackSize) => new RuntimeThread(new Thread(start, maxStackSize));
-        public static RuntimeThread Create(ParameterizedThreadStart start) => new RuntimeThread(new Thread(start));
-        public static RuntimeThread Create(ParameterizedThreadStart start, int maxStackSize) => new RuntimeThread(new Thread(start, maxStackSize));
-
-        public static RuntimeThread CurrentThread => t_currentThread ?? (t_currentThread = new RuntimeThread(Thread.CurrentThread));
-
-        public bool IsAlive => _thread.IsAlive;
-        public bool IsBackground { get => _thread.IsBackground; set => _thread.IsBackground = value; }
-        public bool IsThreadPoolThread => _thread.IsThreadPoolThread;
-        public int ManagedThreadId => _thread.ManagedThreadId;
-        public string Name { get => _thread.Name; set => _thread.Name = value; }
-        public ThreadPriority Priority { get => _thread.Priority; set => _thread.Priority = value; }
-        public ThreadState ThreadState => _thread.ThreadState;
-
-        public ApartmentState GetApartmentState() => _thread.GetApartmentState();
-        public bool TrySetApartmentState(ApartmentState state) => _thread.TrySetApartmentState(state);
-        public void DisableComObjectEagerCleanup() => _thread.DisableComObjectEagerCleanup();
-        public void Interrupt() => _thread.Interrupt();
-        public void Join() => _thread.Join();
-        public bool Join(int millisecondsTimeout) => _thread.Join(millisecondsTimeout);
-
-        public static void Sleep(int millisecondsTimeout) => Thread.Sleep(millisecondsTimeout);
-        public static int GetCurrentProcessorId() => Thread.GetCurrentProcessorId();
-        public static void SpinWait(int iterations) => Thread.SpinWait(iterations);
-        public static bool Yield() => Thread.Yield();
-
-        public void Start() => _thread.Start();
-        public void Start(object parameter) => _thread.Start(parameter);
-    }
-}
index 3b56c77..79a5866 100644 (file)
@@ -20,7 +20,6 @@
   <ItemGroup>
     <Compile Include="$(MSBuildThisFileDirectory)Internal\IO\File.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Internal\Padding.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Internal\Runtime\Augments\RuntimeThread.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Internal\Runtime\CompilerServices\Unsafe.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Internal\Threading\Tasks\AsyncCausalitySupport.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Microsoft\Win32\SafeHandles\CriticalHandleMinusOneIsInvalid.cs" />