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:
@@ -6,7 +6,7 @@ use call::{RemoteVideoTrack, RemoteVideoTrackView, Room};
|
||||
use client::{User, proto::PeerId};
|
||||
use gpui::{
|
||||
AppContext as _, Entity, EventEmitter, FocusHandle, Focusable, InteractiveElement,
|
||||
ParentElement, Render, SharedString, Styled, div,
|
||||
ParentElement, Render, SharedString, Styled, Task, div,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
use ui::{Icon, IconName, prelude::*};
|
||||
@@ -114,14 +114,14 @@ impl Item for SharedScreen {
|
||||
_workspace_id: Option<WorkspaceId>,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Option<Entity<Self>> {
|
||||
Some(cx.new(|cx| Self {
|
||||
) -> Task<Option<Entity<Self>>> {
|
||||
Task::ready(Some(cx.new(|cx| Self {
|
||||
view: self.view.update(cx, |view, cx| view.clone(window, cx)),
|
||||
peer_id: self.peer_id,
|
||||
user: self.user.clone(),
|
||||
nav_history: Default::default(),
|
||||
focus: cx.focus_handle(),
|
||||
}))
|
||||
})))
|
||||
}
|
||||
|
||||
fn to_item_events(event: &Self::Event, mut f: impl FnMut(ItemEvent)) {
|
||||
|
||||
Reference in New Issue
Block a user