diff --git a/src/lib.rs b/src/lib.rs index 3bd8a37..4f6af5e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -406,18 +406,13 @@ impl DedicatedExecutor { } } -#[cfg(unix)] fn set_current_thread_priority(prio: i32) { // on linux setpriority sets the current thread's priority // (as opposed to the current process). + #[cfg(unix)] unsafe { libc::setpriority(0, 0, prio) }; } -#[cfg(not(unix))] -fn set_current_thread_priority(prio: i32) { - warn!("Setting worker thread priority not supported on this platform"); -} - #[cfg(test)] mod tests { use super::*;