chore: Move a few more tasks into background_spawn (#35374)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-07-31 01:56:47 +02:00 committed by GitHub
parent bb1a7ccbba
commit 296bb66b65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 18 deletions

View file

@ -3372,7 +3372,7 @@ impl Project {
let task = self.lsp_store.update(cx, |lsp_store, cx| {
lsp_store.definitions(buffer, position, cx)
});
cx.spawn(async move |_, _| {
cx.background_spawn(async move {
let result = task.await;
drop(guard);
result
@ -3390,7 +3390,7 @@ impl Project {
let task = self.lsp_store.update(cx, |lsp_store, cx| {
lsp_store.declarations(buffer, position, cx)
});
cx.spawn(async move |_, _| {
cx.background_spawn(async move {
let result = task.await;
drop(guard);
result
@ -3408,7 +3408,7 @@ impl Project {
let task = self.lsp_store.update(cx, |lsp_store, cx| {
lsp_store.type_definitions(buffer, position, cx)
});
cx.spawn(async move |_, _| {
cx.background_spawn(async move {
let result = task.await;
drop(guard);
result
@ -3426,7 +3426,7 @@ impl Project {
let task = self.lsp_store.update(cx, |lsp_store, cx| {
lsp_store.implementations(buffer, position, cx)
});
cx.spawn(async move |_, _| {
cx.background_spawn(async move {
let result = task.await;
drop(guard);
result
@ -3444,7 +3444,7 @@ impl Project {
let task = self.lsp_store.update(cx, |lsp_store, cx| {
lsp_store.references(buffer, position, cx)
});
cx.spawn(async move |_, _| {
cx.background_spawn(async move {
let result = task.await;
drop(guard);
result
@ -3996,7 +3996,7 @@ impl Project {
let task = self.lsp_store.update(cx, |lsp_store, cx| {
lsp_store.request_lsp(buffer_handle, server, request, cx)
});
cx.spawn(async move |_, _| {
cx.background_spawn(async move {
let result = task.await;
drop(guard);
result