From f4b3f154e98bb23cb6000b6816ff61e49f52610a Mon Sep 17 00:00:00 2001 From: trivernis Date: Sun, 25 Jul 2021 18:35:59 +0200 Subject: [PATCH] Switch to single threaded tokio runtime Signed-off-by: trivernis --- Cargo.lock | 3 +-- Cargo.toml | 4 ++-- src/main.rs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 530843e..727df7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -598,7 +598,7 @@ dependencies = [ [[package]] name = "hydrus-pixiv-tagger" -version = "0.1.1" +version = "0.1.2" dependencies = [ "env_logger", "hydrus-api", @@ -1745,7 +1745,6 @@ dependencies = [ "libc", "memchr", "mio 0.7.13", - "num_cpus", "pin-project-lite", "tokio-macros", "winapi 0.3.9", diff --git a/Cargo.toml b/Cargo.toml index 7f33ac2..350df50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hydrus-pixiv-tagger" -version = "0.1.1" +version = "0.1.2" edition = "2018" license = "Apache-2.0" description = "Automatically tag hydrus file by using pixiv and saucenao" @@ -22,4 +22,4 @@ thiserror = "1.0.26" [dependencies.tokio] version = "1.9.0" -features = ["macros", "rt-multi-thread", "time"] \ No newline at end of file +features = ["macros", "rt", "time"] \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 8eaf262..b14c6ca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,7 +46,7 @@ struct Opt { finish_tag: Option, } -#[tokio::main] +#[tokio::main(flavor = "current_thread")] async fn main() { env_logger::builder().init(); let opt: Opt = Opt::from_args();