From b59e110c5996cc503a1b1cc63a3dfcd99b527709 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 7 Feb 2024 09:45:49 -0700 Subject: [PATCH] Attempt to fix random lag (#7506) Co-Authored-By: Antonio Co-Authored-By: Thorsten Co-Authored-By: Mikayla Release Notes: - N/A **or** - N/A Co-authored-by: Antonio Co-authored-by: Thorsten Co-authored-by: Mikayla --- crates/gpui/build.rs | 1 + crates/gpui/src/platform/mac/dispatcher.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/gpui/build.rs b/crates/gpui/build.rs index 4c86fe9a62..41505ec678 100644 --- a/crates/gpui/build.rs +++ b/crates/gpui/build.rs @@ -22,6 +22,7 @@ fn generate_dispatch_bindings() { .header("src/platform/mac/dispatch.h") .allowlist_var("_dispatch_main_q") .allowlist_var("DISPATCH_QUEUE_PRIORITY_DEFAULT") + .allowlist_var("DISPATCH_QUEUE_PRIORITY_HIGH") .allowlist_var("DISPATCH_TIME_NOW") .allowlist_function("dispatch_get_global_queue") .allowlist_function("dispatch_async_f") diff --git a/crates/gpui/src/platform/mac/dispatcher.rs b/crates/gpui/src/platform/mac/dispatcher.rs index 46afc14ba8..58375a7e48 100644 --- a/crates/gpui/src/platform/mac/dispatcher.rs +++ b/crates/gpui/src/platform/mac/dispatcher.rs @@ -56,7 +56,7 @@ impl PlatformDispatcher for MacDispatcher { fn dispatch(&self, runnable: Runnable, _: Option) { unsafe { dispatch_async_f( - dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT.try_into().unwrap(), 0), + dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH.try_into().unwrap(), 0), runnable.into_raw().as_ptr() as *mut c_void, Some(trampoline), );