While setting Priority Class is supported and Priority Class is mapped like
|
#[cfg(windows)] |
|
let priority_class = match new_niceness { |
|
..=-20 => REALTIME_PRIORITY_CLASS, |
|
-19 => HIGH_PRIORITY_CLASS, |
|
-18..=-1 => ABOVE_NORMAL_PRIORITY_CLASS, |
|
0 => NORMAL_PRIORITY_CLASS, |
|
1..=18 => BELOW_NORMAL_PRIORITY_CLASS, |
|
19.. => IDLE_PRIORITY_CLASS, |
|
}; |
. showing (mapping) current Priority Class is not supported:
|
#[cfg(not(unix))] |
|
let current_niceness = 0i32; // todo: what we can do? |
It would be better to be compatible with Cygwin's nice command.
Also, nice should show raw Priority Class e.g. instead of value if it is not a mapped class.
ref: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setpriorityclass
While setting Priority Class is supported and Priority Class is mapped like
coreutils/src/uu/nice/src/nice.rs
Lines 159 to 167 in 2c0e1b9
. showing (mapping) current Priority Class is not supported:
coreutils/src/uu/nice/src/nice.rs
Lines 109 to 110 in 2c0e1b9
It would be better to be compatible with Cygwin's
nicecommand.Also,
niceshould show raw Priority Class e.g. instead of value if it is not a mapped class.ref: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setpriorityclass