From a50ae02fb35907871562ae8a751bfaac36b2d212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20F=C3=B6rster?= Date: Mon, 22 Apr 2019 21:21:59 +0200 Subject: [PATCH] Use futures 0.3 executor --- src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7cb00ac6..6334c47d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,10 +15,8 @@ mod syntax; mod workspace; use clap::*; -use futures::prelude::*; +use futures::executor::ThreadPool; use server::LatexLspServer; -use std::sync::Arc; -use tokio; use tokio_stdin_stdout; fn main() { @@ -46,6 +44,7 @@ fn main() { .init() .unwrap(); + let mut pool = ThreadPool::new().expect("Failed to create the thread pool"); let future = async { let server = LatexLspServer; let stdin = tokio_stdin_stdout::stdin(0).make_sendable(); @@ -53,5 +52,5 @@ fn main() { await!(lsp::listen(server, stdin, stdout)) }; - tokio::run(future.boxed().compat()); + pool.run(future).unwrap(); }