Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Use HIGH priority to wake blocked timers (#11269)
Conrad Irwine5b88ac8c25f
diff --git a/crates/collab/src/api/events.rs b/crates/collab/src/api/events.rsindex 9c9361dc7db..6085b416554 100644--- a/crates/collab/src/api/events.rs+++ b/crates/collab/src/api/events.rs@@ -264,7 +264,7 @@ pub async fn post_hang(Error::Internal(anyhow!(err))})?;- let mut backtrace = "Possible hang detected on main threadL".to_string();+ let mut backtrace = "Possible hang detected on main thread:".to_string();let unknown = "<unknown>".to_string();for frame in report.backtrace.iter() {backtrace.push_str(&format!("\n{}", frame.symbols.first().unwrap_or(&unknown)));diff --git a/crates/gpui/build.rs b/crates/gpui/build.rsindex f9f38b626e7..46c55ee278e 100644--- a/crates/gpui/build.rs+++ b/crates/gpui/build.rs@@ -47,7 +47,6 @@ mod macos {.header("src/platform/mac/dispatch.h").allowlist_var("_dispatch_main_q").allowlist_var("_dispatch_source_type_data_add")- .allowlist_var("DISPATCH_QUEUE_PRIORITY_DEFAULT").allowlist_var("DISPATCH_QUEUE_PRIORITY_HIGH").allowlist_var("DISPATCH_TIME_NOW").allowlist_function("dispatch_get_global_queue")diff --git a/crates/gpui/src/platform/mac/dispatcher.rs b/crates/gpui/src/platform/mac/dispatcher.rsindex 58375a7e488..d5ad0102001 100644--- a/crates/gpui/src/platform/mac/dispatcher.rs+++ b/crates/gpui/src/platform/mac/dispatcher.rs@@ -76,7 +76,7 @@ impl PlatformDispatcher for MacDispatcher {fn dispatch_after(&self, duration: Duration, runnable: Runnable) {unsafe {let queue =- dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT.try_into().unwrap(), 0);+ dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH.try_into().unwrap(), 0);let when = dispatch_time(DISPATCH_TIME_NOW as u64, duration.as_nanos() as i64);dispatch_after_f(when,