Use futures 0.3 executor

This commit is contained in:
Eric Förster 2019-04-22 21:21:59 +02:00
parent 187d76b586
commit a50ae02fb3

View file

@ -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();
}