project: Spawn terminal process on background executor (#40774)

We were spawning the process on the foreground thread before which can
block an arbitrary amount of time. Likewise we no longer block
deserialization on the terminal loading.

Release Notes:

- Improved startup time on systems with slow process spawning
capabilities
This commit is contained in:
Lukas Wirth
2025-10-21 13:10:21 +00:00
committed by GitHub
parent 0be70e24d6
commit 0eccdfe61f
28 changed files with 744 additions and 657 deletions
+5 -3
View File
@@ -1,5 +1,7 @@
#![allow(unused, dead_code)]
use gpui::{AnyElement, App, Entity, EventEmitter, FocusHandle, Focusable, Hsla, actions, hsla};
use gpui::{
AnyElement, App, Entity, EventEmitter, FocusHandle, Focusable, Hsla, Task, actions, hsla,
};
use strum::IntoEnumIterator;
use theme::all_theme_colors;
use ui::{
@@ -100,11 +102,11 @@ impl Item for ThemePreview {
_workspace_id: Option<crate::WorkspaceId>,
window: &mut Window,
cx: &mut Context<Self>,
) -> Option<Entity<Self>>
) -> Task<Option<Entity<Self>>>
where
Self: Sized,
{
Some(cx.new(|cx| Self::new(window, cx)))
Task::ready(Some(cx.new(|cx| Self::new(window, cx))))
}
}