Skip to content

Visual Studio Code, rebuilt in Rust

Rust

fix(exthost): send workbench host calls while ask_workbench waits

rokartur9df4e42de7f1
diff --git a/native/crates/exthost/src/session.rs b/native/crates/exthost/src/session.rs
index bef4a50bfe8..2a5cbe089e6 100644
--- a/native/crates/exthost/src/session.rs
+++ b/native/crates/exthost/src/session.rs
@@ -390,6 +390,8 @@ impl Session {
if let Some(result) = self.take_result(req) {
break Some(result);
}
+ // The answer can wait on the workbench's own host calls (a debug memory read sends `readMemory` to the adapter).
+ self.flush_main_thread();
if !matches!(self.pump(Duration::from_millis(20)), Ok(true)) {
break None;
}