Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

windows: Improve foreground task dispatching on Windows (continued) (#23415)

张小白c66f611037eb
diff --git a/crates/gpui/src/platform/windows/platform.rs b/crates/gpui/src/platform/windows/platform.rs
index bf1ccc69904..53e67067175 100644
--- a/crates/gpui/src/platform/windows/platform.rs
+++ b/crates/gpui/src/platform/windows/platform.rs
@@ -167,7 +167,7 @@ impl WindowsPlatform {
#[inline]
fn run_foreground_task(&self) {
- if let Ok(runnable) = self.main_receiver.try_recv() {
+ for runnable in self.main_receiver.drain() {
runnable.run();
}
}