Skip to content

Commit 1b99ad1

Browse files
Copilotjkotas
andcommitted
Fix build errors by removing duplicate member definitions
Co-authored-by: jkotas <[email protected]>
1 parent 4ca050c commit 1b99ad1

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.Windows.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ public sealed partial class Thread
3434

3535
partial void PlatformSpecificInitialize();
3636

37-
partial void CheckForPendingInterrupt();
38-
3937
// Platform-specific initialization of foreign threads, i.e. threads not created by Thread.Start
4038
private void PlatformSpecificInitializeExistingThread()
4139
{

src/libraries/System.Private.CoreLib/src/System/Threading/Thread.Windows.cs

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -16,63 +16,13 @@ namespace System.Threading
1616
{
1717
public sealed partial class Thread
1818
{
19-
#if NATIVEAOT
20-
[ThreadStatic]
21-
private static bool t_interruptRequested;
22-
23-
[ThreadStatic]
24-
private static bool t_inAlertableWait;
25-
26-
private volatile bool _pendingInterrupt;
27-
#endif
2819
internal static void UninterruptibleSleep0() => Interop.Kernel32.Sleep(0);
2920

3021
#if !CORECLR
3122
private static void SleepInternal(int millisecondsTimeout)
3223
{
3324
Debug.Assert(millisecondsTimeout >= -1);
34-
#if NATIVEAOT
35-
Thread? currentThread = t_currentThread;
36-
37-
// Check for pending interrupt from before thread started
38-
if (currentThread != null && currentThread._pendingInterrupt)
39-
{
40-
currentThread._pendingInterrupt = false;
41-
throw new ThreadInterruptedException();
42-
}
43-
44-
if (currentThread != null)
45-
{
46-
currentThread.SetWaitSleepJoinState();
47-
}
48-
49-
try
50-
{
51-
t_inAlertableWait = true;
52-
53-
uint result = Interop.Kernel32.SleepEx((uint)millisecondsTimeout, Interop.BOOL.TRUE);
54-
55-
// Check if we were interrupted by an APC
56-
if (result == Interop.Kernel32.WAIT_IO_COMPLETION)
57-
{
58-
if (t_interruptRequested)
59-
{
60-
t_interruptRequested = false;
61-
throw new ThreadInterruptedException();
62-
}
63-
}
64-
}
65-
finally
66-
{
67-
t_inAlertableWait = false;
68-
if (currentThread != null)
69-
{
70-
currentThread.ClearWaitSleepJoinState();
71-
}
72-
}
73-
#else
7425
Interop.Kernel32.Sleep((uint)millisecondsTimeout);
75-
#endif
7626
}
7727
#endif
7828

0 commit comments

Comments
 (0)