chore: Move a few more tasks into background_spawn (#35374)
Release Notes: - N/A
This commit is contained in:
parent
bb1a7ccbba
commit
296bb66b65
2 changed files with 18 additions and 18 deletions
|
@ -4911,7 +4911,7 @@ impl LspStore {
|
|||
language_server_id: server_id.0 as u64,
|
||||
hint: Some(InlayHints::project_to_proto_hint(hint.clone())),
|
||||
};
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
let response = upstream_client
|
||||
.request(request)
|
||||
.await
|
||||
|
@ -5125,7 +5125,7 @@ impl LspStore {
|
|||
trigger,
|
||||
version: serialize_version(&buffer.read(cx).version()),
|
||||
};
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
client
|
||||
.request(request)
|
||||
.await?
|
||||
|
@ -5284,7 +5284,7 @@ impl LspStore {
|
|||
GetDefinitions { position },
|
||||
cx,
|
||||
);
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
Ok(definitions_task
|
||||
.await
|
||||
.into_iter()
|
||||
|
@ -5357,7 +5357,7 @@ impl LspStore {
|
|||
GetDeclarations { position },
|
||||
cx,
|
||||
);
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
Ok(declarations_task
|
||||
.await
|
||||
.into_iter()
|
||||
|
@ -5430,7 +5430,7 @@ impl LspStore {
|
|||
GetTypeDefinitions { position },
|
||||
cx,
|
||||
);
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
Ok(type_definitions_task
|
||||
.await
|
||||
.into_iter()
|
||||
|
@ -5503,7 +5503,7 @@ impl LspStore {
|
|||
GetImplementations { position },
|
||||
cx,
|
||||
);
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
Ok(implementations_task
|
||||
.await
|
||||
.into_iter()
|
||||
|
@ -5576,7 +5576,7 @@ impl LspStore {
|
|||
GetReferences { position },
|
||||
cx,
|
||||
);
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
Ok(references_task
|
||||
.await
|
||||
.into_iter()
|
||||
|
@ -5660,7 +5660,7 @@ impl LspStore {
|
|||
},
|
||||
cx,
|
||||
);
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
Ok(all_actions_task
|
||||
.await
|
||||
.into_iter()
|
||||
|
@ -6854,7 +6854,7 @@ impl LspStore {
|
|||
} else {
|
||||
let document_colors_task =
|
||||
self.request_multiple_lsp_locally(buffer, None::<usize>, GetDocumentColor, cx);
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
Ok(document_colors_task
|
||||
.await
|
||||
.into_iter()
|
||||
|
@ -6933,7 +6933,7 @@ impl LspStore {
|
|||
GetSignatureHelp { position },
|
||||
cx,
|
||||
);
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
all_actions_task
|
||||
.await
|
||||
.into_iter()
|
||||
|
@ -7010,7 +7010,7 @@ impl LspStore {
|
|||
GetHover { position },
|
||||
cx,
|
||||
);
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
all_actions_task
|
||||
.await
|
||||
.into_iter()
|
||||
|
@ -8013,7 +8013,7 @@ impl LspStore {
|
|||
})
|
||||
.collect::<FuturesUnordered<_>>();
|
||||
|
||||
cx.spawn(async move |_, _| {
|
||||
cx.background_spawn(async move {
|
||||
let mut responses = Vec::with_capacity(response_results.len());
|
||||
while let Some((server_id, response_result)) = response_results.next().await {
|
||||
if let Some(response) = response_result.log_err() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue