diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-23 10:24:53 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-23 10:24:53 +0300 |
commit | 2e76c16b23a52e51a6d8cddf54a6cf966e11a7d3 (patch) | |
tree | bc350b710df2b44e7f07be09265402d987265993 | |
parent | 1fc24589806a08080ae0862a309d938ce649fdc5 (diff) | |
download | summain-rs-2e76c16b23a52e51a6d8cddf54a6cf966e11a7d3.tar.gz |
use explcit runtime
-rw-r--r-- | src/bin/summain.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bin/summain.rs b/src/bin/summain.rs index 377a84d..ec17d66 100644 --- a/src/bin/summain.rs +++ b/src/bin/summain.rs @@ -3,8 +3,15 @@ use std::path::{Path, PathBuf}; use structopt::StructOpt; use summain::ManifestEntry; -#[tokio::main] -async fn main() -> anyhow::Result<()> { +fn main() -> anyhow::Result<()> { + let runtime = tokio::runtime::Builder::new_multi_thread() + .worker_threads(16) + .build()?; + runtime.block_on(async { async_main().await })?; + Ok(()) +} + +async fn async_main() -> anyhow::Result<()> { let mut opt = Opt::from_args(); opt.pathnames[..].sort(); |