Move Wasi to async, validate timeslicing, using async in traits still WIP

This commit is contained in:
Isaac Clayton 2022-06-07 17:05:55 +02:00
parent e9b87f3dc3
commit 8bce35d1e9
5 changed files with 144 additions and 115 deletions

View file

@ -21,6 +21,7 @@ use futures::{
};
use gpui::{executor::Background, App, AssetSource, AsyncAppContext, Task};
use isahc::{config::Configurable, AsyncBody, Request};
use language::LanguageRegistry;
use log::LevelFilter;
use parking_lot::Mutex;
use project::{Fs, ProjectStore};
@ -163,7 +164,7 @@ fn main() {
app.run(move |cx| {
let client = client::Client::new(http.clone());
let mut languages = languages::build_language_registry(login_shell_env_loaded);
let mut languages = LanguageRegistry::new(login_shell_env_loaded);
let user_store = cx.add_model(|cx| UserStore::new(client.clone(), http.clone(), cx));
context_menu::init(cx);
@ -210,6 +211,9 @@ fn main() {
languages.set_language_server_download_dir(zed::ROOT_PATH.clone());
let languages = Arc::new(languages);
cx.background()
.spawn(languages::init(languages.clone(), cx.background().clone()))
.detach();
cx.observe_global::<Settings, _>({
let languages = languages.clone();