Fixed refactor of setup of mining threads.

This commit is contained in:
Revertron committed 2021-03-16 21:42:16 +01:00
1 parent 99eabff874
commit fb53d775a1
1 file changed
+3
+3
View File
@@ -19,12 +19,15 @@ pub fn from_hex(string: &str) -> Result<Vec<u8>, num::ParseIntError> {
}
#[cfg(not(target_os = "macos"))]
#[allow(unused_variables)]
pub fn setup_miner_thread(cpu: u32) {
let _ = set_current_thread_priority(ThreadPriority::Min);
#[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
}