From fb53d775a12984ba870a5938cd3f03317ebd19af Mon Sep 17 00:00:00 2001 From: Revertron Date: Tue, 16 Mar 2021 21:42:16 +0100 Subject: [PATCH] Fixed refactor of setup of mining threads. --- src/utils.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index f378950..0c8dc01 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -19,12 +19,15 @@ pub fn from_hex(string: &str) -> Result, num::ParseIntError> { } #[cfg(not(target_os = "macos"))] +#[allow(unused_variables)] pub fn setup_miner_thread(cpu: u32) { let _ = set_current_thread_priority(ThreadPriority::Min); - let _ = set_current_thread_ideal_processor(IdealProcessor::from(cpu)); + #[cfg(target_os = "windows")] + let _ = set_current_thread_ideal_processor(IdealProcessor::from(cpu)); } #[cfg(target_os = "macos")] +#[allow(unused_variables)] pub fn setup_miner_thread(cpu: u32) { // MacOS is not supported by thread_priority crate }