Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
gpui: Fix flaky hang monitor shutdown test (#64993)
Anthony Eid4c0ead4a3e37
diff --git a/crates/gpui/src/profiler/hang.rs b/crates/gpui/src/profiler/hang.rsindex e251f64176b..03c2f302990 100644--- a/crates/gpui/src/profiler/hang.rs+++ b/crates/gpui/src/profiler/hang.rs@@ -691,6 +691,10 @@ mod tests {fn app_flushes_its_hang_monitor_on_shutdown(cx: &mut TestAppContext) {use super::{HangMonitorConfig, HangMonitorPollReason};+ // The monitor runs on a real OS thread, so shutdown has to park until it+ // finishes the flush, and its completion wakes the scheduler from that thread.+ cx.executor().allow_parking();+let (sender, receiver) = std::sync::mpsc::channel();cx.update(|cx| {cx.start_hang_monitor(