process & xtd::diagnostics::process::priority_class | ( | xtd::diagnostics::process_priority_class | value | ) |
Sets the overall priority category for the associated process.
value | The priority category for the associated process, from which the xtd::diagnostics::process::base_priority of the process is calculated. |
xtd::invalid_operation_exception | There is no process associated with this xtd::diagnostics::process object. |
Windows base_priority | macOS base_priority | linux base_priority | priority_class |
---|---|---|---|
4 | PRIO_MIN (-20) | PRIO_MIN (-20) | xtd::diagnostics::process_priority_class::idle |
6 | PRIO_MIN + (PRIO_MAX - PRIO_MIN) / 4 (-10) | PRIO_MIN + (PRIO_MAX - PRIO_MIN) / 4 (-10) | xtd::diagnostics::process_priority_class::below_normal |
8 | PRIO_MIN + (PRIO_MAX - PRIO_MIN)/2 (0) | PRIO_MIN + (PRIO_MAX - PRIO_MIN)/2 (0) | xtd::diagnostics::process_priority_class::normal |
10 | PRIO_MAX - (PRIO_MAX - PRIO_MIN) / 4 (10) | PRIO_MAX - (PRIO_MAX - PRIO_MIN) / 4 (10) | xtd::diagnostics::process_priority_class::above_normal |
13 | PRIO_MAX - (PRIO_MAX - PRIO_MIN) / 8 (15) | PRIO_MAX - (PRIO_MAX - PRIO_MIN) / 8 (15) | xtd::diagnostics::process_priority_class::high |
24 | PRIO_MAX (20) | PRIO_MAX (20) | xtd::diagnostics::process_priority_class::real_time |