From b214804850d5b726a91df8de18da1a54b679d288 Mon Sep 17 00:00:00 2001 From: Benjamin Brittain Date: Tue, 24 Mar 2020 13:53:48 -0700 Subject: [PATCH] Disable lowering thread priority on Fuchsia (#1394) --- crates/environ/src/cache/worker.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/environ/src/cache/worker.rs b/crates/environ/src/cache/worker.rs index f17ffa4103..b3df2802b1 100644 --- a/crates/environ/src/cache/worker.rs +++ b/crates/environ/src/cache/worker.rs @@ -219,6 +219,15 @@ impl WorkerThread { } } + #[cfg(target_os = "fuchsia")] + fn lower_thread_priority() { + // TODO This needs to use Fuchsia thread profiles + // https://fuchsia.dev/fuchsia-src/reference/kernel_objects/profile + warn!( + "Lowering thread priority on Fuchsia is currently a noop. It might affect application performance." + ); + } + #[cfg(target_os = "windows")] fn lower_thread_priority() { use std::convert::TryInto; @@ -241,7 +250,7 @@ impl WorkerThread { } } - #[cfg(not(target_os = "windows"))] + #[cfg(not(any(target_os = "windows", target_os = "fuchsia")))] fn lower_thread_priority() { // http://man7.org/linux/man-pages/man7/sched.7.html