diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs index ccb39ab8a220622e8076a89458eed3db2b68e4ed..b9701a83d235ee79833a5351b0647c8e025c50c7 100644 --- a/crates/lsp/src/lsp.rs +++ b/crates/lsp/src/lsp.rs @@ -421,14 +421,14 @@ impl LanguageServer { .map(|stderr| { let io_handlers = io_handlers.clone(); let stderr_captures = stderr_capture.clone(); - cx.spawn(async move |_| { + cx.background_spawn(async move { Self::handle_stderr(stderr, io_handlers, stderr_captures) .log_err() .await }) }) .unwrap_or_else(|| Task::ready(None)); - let input_task = cx.spawn(async move |_| { + let input_task = cx.background_spawn(async move { let (stdout, stderr) = futures::join!(stdout_input_task, stderr_input_task); stdout.or(stderr) }); @@ -846,7 +846,7 @@ impl LanguageServer { configuration: Arc, cx: &App, ) -> Task>> { - cx.spawn(async move |_| { + cx.background_spawn(async move { let response = self .request::(params) .await diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs index 5a8cc05d7d93f9877ab7df468d8e8971488d8c1a..dd4d0a7f40cf38f97fcb6b8dd06f56eb684818fa 100644 --- a/crates/project/src/lsp_store.rs +++ b/crates/project/src/lsp_store.rs @@ -424,7 +424,7 @@ impl LocalLspStore { if settings.as_ref().is_some_and(|b| b.path.is_some()) { let settings = settings.unwrap(); - return cx.spawn(async move |_| { + return cx.background_spawn(async move { let mut env = delegate.shell_env().await; env.extend(settings.env.unwrap_or_default()); diff --git a/crates/remote/src/ssh_session.rs b/crates/remote/src/ssh_session.rs index e31d3dcfd59cfba783587af45a1b16d5892554c8..4306251e44acf988ce90fcd640d8c8bed36f1ee7 100644 --- a/crates/remote/src/ssh_session.rs +++ b/crates/remote/src/ssh_session.rs @@ -1742,7 +1742,7 @@ impl SshRemoteConnection { } }); - cx.spawn(async move |_| { + cx.background_spawn(async move { let result = futures::select! { result = stdin_task.fuse() => { result.context("stdin")