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:
@@ -693,11 +693,11 @@ impl Item for BufferDiagnosticsEditor {
|
||||
_workspace_id: Option<workspace::WorkspaceId>,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Option<Entity<Self>>
|
||||
) -> Task<Option<Entity<Self>>>
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
Some(cx.new(|cx| {
|
||||
Task::ready(Some(cx.new(|cx| {
|
||||
BufferDiagnosticsEditor::new(
|
||||
self.project_path.clone(),
|
||||
self.project.clone(),
|
||||
@@ -706,7 +706,7 @@ impl Item for BufferDiagnosticsEditor {
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
}))
|
||||
})))
|
||||
}
|
||||
|
||||
fn deactivated(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||
|
||||
@@ -732,11 +732,11 @@ impl Item for ProjectDiagnosticsEditor {
|
||||
_workspace_id: Option<workspace::WorkspaceId>,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Option<Entity<Self>>
|
||||
) -> Task<Option<Entity<Self>>>
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
Some(cx.new(|cx| {
|
||||
Task::ready(Some(cx.new(|cx| {
|
||||
ProjectDiagnosticsEditor::new(
|
||||
self.include_warnings,
|
||||
self.project.clone(),
|
||||
@@ -744,7 +744,7 @@ impl Item for ProjectDiagnosticsEditor {
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
}))
|
||||
})))
|
||||
}
|
||||
|
||||
fn is_dirty(&self, cx: &App) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user