Skip to content

Commit

Permalink
Add boolean field to indicate whether or not the Windows thread pool …
Browse files Browse the repository at this point in the history
…is being used (#90551)
  • Loading branch information
eduardo-vp authored Aug 25, 2023
1 parent f9b07d4 commit ea20228
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ public static partial class ThreadPool
internal static bool UseWindowsThreadPool { get; } =
AppContextConfigHelper.GetBooleanConfig("System.Threading.ThreadPool.UseWindowsThreadPool", "DOTNET_ThreadPool_UseWindowsThreadPool");

#pragma warning disable CA1823
// The field should reflect what the property returns because the property can be stubbed by trimming,
// such that sos reflects the actual state of what thread pool is being used and not just the config value.
private static readonly bool s_useWindowsThreadPool = UseWindowsThreadPool; // Name relied on by sos
#pragma warning restore CA1823

#if NATIVEAOT
private const bool IsWorkerTrackingEnabledInConfig = false;
#else
Expand Down

0 comments on commit ea20228

Please sign in to comment.