diff options
author | Jan Kotas <jkotas@microsoft.com> | 2019-03-28 23:00:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-28 23:00:53 -0700 |
commit | b1b8718355a687c7223de9f4a45e10937d2bf3f1 (patch) | |
tree | dd44df0eeffac631b7b2fac5615059060ae5c0d6 | |
parent | ff25b931d519c1399838c3ac36ea41f264ae7cf3 (diff) | |
download | coreclr-b1b8718355a687c7223de9f4a45e10937d2bf3f1.tar.gz coreclr-b1b8718355a687c7223de9f4a45e10937d2bf3f1.tar.bz2 coreclr-b1b8718355a687c7223de9f4a45e10937d2bf3f1.zip |
Delete RuntimeThread.cs (#23532)
No longer needed
-rw-r--r-- | src/System.Private.CoreLib/shared/Internal/Runtime/Augments/RuntimeThread.cs | 56 | ||||
-rw-r--r-- | src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems | 1 |
2 files changed, 0 insertions, 57 deletions
diff --git a/src/System.Private.CoreLib/shared/Internal/Runtime/Augments/RuntimeThread.cs b/src/System.Private.CoreLib/shared/Internal/Runtime/Augments/RuntimeThread.cs deleted file mode 100644 index 5e811c0cfc..0000000000 --- a/src/System.Private.CoreLib/shared/Internal/Runtime/Augments/RuntimeThread.cs +++ /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); - } -} diff --git a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems index 3b56c77fd5..79a5866ef8 100644 --- a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems +++ b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems @@ -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" /> |