Attempt to fix random lag (#7506)
Conrad Irwin
,
Antonio
,
Thorsten
, and
Mikayla
created
Co-Authored-By: Antonio <antonio@zed.dev>
Co-Authored-By: Thorsten <thorsten@zed.dev>
Co-Authored-By: Mikayla <mikayla@zed.dev>
Release Notes:
- N/A
**or**
- N/A
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Change summary
crates/gpui/build.rs | 1 +
crates/gpui/src/platform/mac/dispatcher.rs | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
Detailed changes
@@ -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")
@@ -56,7 +56,7 @@ impl PlatformDispatcher for MacDispatcher {
fn dispatch(&self, runnable: Runnable, _: Option<TaskLabel>) {
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),
);