summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2018-12-23 03:20:39 (GMT)
committerDan Moseley <danmose@microsoft.com>2018-12-23 03:20:39 (GMT)
commit18c33d2896ca55ca661c6ed864c0d1f2eedab170 (patch)
tree56820fb9beac5a88250cd6976f057b260ec01c69
parent622455699eab8fc6959fb9f85469f14fb621b4df (diff)
downloadcoreclr-18c33d2896ca55ca661c6ed864c0d1f2eedab170.zip
coreclr-18c33d2896ca55ca661c6ed864c0d1f2eedab170.tar.gz
coreclr-18c33d2896ca55ca661c6ed864c0d1f2eedab170.tar.bz2
Extracts public IThreadPoolWorkItem interface to shared CoreLib (#21653)
-rw-r--r--src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems1
-rw-r--r--src/System.Private.CoreLib/shared/System/Threading/IThreadPoolWorkItem.cs12
-rw-r--r--src/System.Private.CoreLib/src/System/Threading/ThreadPool.cs6
3 files changed, 13 insertions, 6 deletions
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 fe69d3d..a2d8a87 100644
--- a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
+++ b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
@@ -683,6 +683,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\EventResetMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\EventWaitHandle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ExecutionContext.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Threading\IThreadPoolWorkItem.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LazyInitializer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LazyThreadSafetyMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LockRecursionException.cs" />
diff --git a/src/System.Private.CoreLib/shared/System/Threading/IThreadPoolWorkItem.cs b/src/System.Private.CoreLib/shared/System/Threading/IThreadPoolWorkItem.cs
new file mode 100644
index 0000000..31cd991
--- /dev/null
+++ b/src/System.Private.CoreLib/shared/System/Threading/IThreadPoolWorkItem.cs
@@ -0,0 +1,12 @@
+// 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.
+
+namespace System.Threading
+{
+ /// <summary>Represents a work item that can be executed by the ThreadPool.</summary>
+ public interface IThreadPoolWorkItem
+ {
+ void Execute();
+ }
+} \ No newline at end of file
diff --git a/src/System.Private.CoreLib/src/System/Threading/ThreadPool.cs b/src/System.Private.CoreLib/src/System/Threading/ThreadPool.cs
index cf44d85..2f77425 100644
--- a/src/System.Private.CoreLib/src/System/Threading/ThreadPool.cs
+++ b/src/System.Private.CoreLib/src/System/Threading/ThreadPool.cs
@@ -917,12 +917,6 @@ namespace System.Threading
public delegate void WaitOrTimerCallback(object state, bool timedOut); // signaled or timed out
- /// <summary>Represents a work item that can be executed by the ThreadPool.</summary>
- public interface IThreadPoolWorkItem
- {
- void Execute();
- }
-
//
// This type is necessary because VS 2010's debugger looks for a method named _ThreadPoolWaitCallbacck.PerformWaitCallback
// on the stack to determine if a thread is a ThreadPool thread or not. We have a better way to do this for .NET 4.5, but