aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/main.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-09-04 09:18:40 +0000
committerBlaž Hrastnik2020-09-04 09:18:40 +0000
commit0d56ce9296ef6481b45cfdc90ea8b1d149ead242 (patch)
treefd08a114df4baee24c1994799541e8a2bfb2c449 /helix-term/src/main.rs
parentbfa753307063034abd86de5d9f99f5fe925504ca (diff)
Bump deps, make it compile with latest smol.
Diffstat (limited to 'helix-term/src/main.rs')
-rw-r--r--helix-term/src/main.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs
index 6e5ec5ff..7a9289ee 100644
--- a/helix-term/src/main.rs
+++ b/helix-term/src/main.rs
@@ -18,12 +18,19 @@ pub struct Args {
files: Vec<PathBuf>,
}
+static EX: smol::Executor = smol::Executor::new();
+
fn main() -> Result<(), Error> {
let args: Args = argh::from_env();
println!("{:?}", args.files);
- let mut editor = editor::Editor::new(args)?;
- editor.run();
+ for _ in 0..num_cpus::get() {
+ std::thread::spawn(move || smol::block_on(EX.run(smol::future::pending::<()>())));
+ }
+
+ smol::block_on(EX.run(async {
+ editor::Editor::new(args).unwrap().run().await;
+ }));
Ok(())
}