From ac85440c82f628d426f37a414bcb5de16796e3f3 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 4c86fe9a622bebef795a0590d8fd1acf84b6f762..41505ec6783ebb417f062ff8ea0b5d78c115855d 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 72daa8c4404f52836d45ad39517b9b4bb3db57dd..281d90cddec4733e4a828c4a8e89b4fc0ef3feb9 100644 --- a/crates/gpui/src/platform/mac/dispatcher.rs +++ b/crates/gpui/src/platform/mac/dispatcher.rs @@ -51,7 +51,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), );