Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ public static void ThreadPoolThreadCreationDoesNotTransferExecutionContext()
}).Dispose();
}

[ConditionalFact(typeof(ThreadPoolTests), nameof(IsThreadingAndRemoteExecutorSupported))]
[ConditionalFact(typeof(ThreadPoolTests), nameof(IsThreadingAndRemoteExecutorSupportedAndNotDebugRuntime))]
public static void CooperativeBlockingCanCreateThreadsFaster()
{
// Run in a separate process to test in a clean thread pool environment such that work items queued by the test
Expand Down Expand Up @@ -1501,6 +1501,10 @@ public static unsafe void ThreadPoolCompletedWorkItemCountTest()
public static bool IsThreadingAndRemoteExecutorSupported =>
PlatformDetection.IsMultithreadingSupported && RemoteExecutor.IsSupported;

// Timing-sensitive tests can be too flaky on a Debug runtime, which is much slower
public static bool IsThreadingAndRemoteExecutorSupportedAndNotDebugRuntime =>
IsThreadingAndRemoteExecutorSupported && !PlatformDetection.IsDebugRuntime;

private static bool GetUseWindowsThreadPool()
{
AppContext.TryGetSwitch("System.Threading.ThreadPool.UseWindowsThreadPool", out bool useWindowsThreadPool);
Expand Down
Loading