共用方式為


CA1600: Do not use idle process priority

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Item Value
RuleId CA1600
Category Microsoft.Mobility
Breaking change Breaking

Cause

This rule occurs when processes are set to ProcessPriorityClass.Idle.

Rule description

Do not set process priority to Idle. Processes that have System.Diagnostics.ProcessPriorityClass.Idle will occupy the CPU when it would otherwise be idle, and will therefore block standby.

How to fix violations

Set processes to ProcessPriorityClass.BelowNormal.

When to suppress warnings

This rule should be suppressed only when Idle process priority is required and mobility considerations can be ignored safely.