Explorar o código

ThreadingHelper: Use Environment.ProcessorCount instead of SystemInfo.processorCount

ghorsington %!s(int64=4) %!d(string=hai) anos
pai
achega
a41c082481
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      BepInEx/ThreadingHelper.cs

+ 1 - 1
BepInEx/ThreadingHelper.cs

@@ -214,7 +214,7 @@ namespace BepInEx
 		public static IEnumerable<TOut> RunParallel<TIn, TOut>(this IList<TIn> data, Func<TIn, TOut> work, int workerCount = -1)
 		{
 			if (workerCount < 0)
-				workerCount = Mathf.Max(2, SystemInfo.processorCount);
+				workerCount = Mathf.Max(2, Environment.ProcessorCount);
 			else if (workerCount == 0)
 				throw new ArgumentException("Need at least 1 worker", nameof(workerCount));