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.

extensions: Load extension byte repr in background thread (again) (#41398)

Piotr Osiewiczb9eafb80fdd3
diff --git a/crates/extension_host/src/wasm_host.rs b/crates/extension_host/src/wasm_host.rs
index bf3732b7e84..eb26c44f205 100644
--- a/crates/extension_host/src/wasm_host.rs
+++ b/crates/extension_host/src/wasm_host.rs
@@ -658,7 +658,7 @@ impl WasmHost {
};
cx.spawn(async move |cx| {
let (extension_task, manifest, work_dir, tx, zed_api_version) =
- load_extension_task.await?;
+ cx.background_executor().spawn(load_extension_task).await?;
// we need to run run the task in an extension context as wasmtime_wasi may
// call into tokio, accessing its runtime handle
let task = Arc::new(gpui_tokio::Tokio::spawn(cx, extension_task)?);