We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f877c4 commit ab8de31Copy full SHA for ab8de31
src/BenchmarkDotNet/Extensions/ProcessExtensions.cs
@@ -27,6 +27,10 @@ public static class ProcessExtensions
27
28
public static void EnsureHighPriority(this Process process, ILogger logger)
29
{
30
+ // Process.set_PriorityClass requires root on Unix
31
+ if (!OsDetector.IsWindows())
32
+ return;
33
+
34
try
35
36
process.PriorityClass = ProcessPriorityClass.High;
@@ -63,6 +67,10 @@ public static bool TrySetPriority(
63
67
if (logger == null)
64
68
throw new ArgumentNullException(nameof(logger));
65
69
70
71
72
+ return false;
73
66
74
75
76
process.PriorityClass = priority;
0 commit comments