From 2f927487e8b529ba5651e480f8611b6b22ca3d18 Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Wed, 25 Nov 2020 00:21:33 +0800 Subject: [PATCH] remove actix-threadpool re-export from actix-rt --- actix-rt/Cargo.toml | 5 ----- actix-rt/src/arbiter.rs | 5 +---- actix-rt/src/lib.rs | 4 ---- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/actix-rt/Cargo.toml b/actix-rt/Cargo.toml index 7826b7d5..68bca814 100644 --- a/actix-rt/Cargo.toml +++ b/actix-rt/Cargo.toml @@ -15,13 +15,8 @@ edition = "2018" name = "actix_rt" path = "src/lib.rs" -[features] -default = ["blocking"] -blocking = ["actix-threadpool"] - [dependencies] actix-macros = "0.1.0" -actix-threadpool = { version = "0.3", optional = true } copyless = "0.1.4" futures-channel = "0.3.4" futures-util = { version = "0.3.4", default-features = false, features = ["alloc"] } diff --git a/actix-rt/src/arbiter.rs b/actix-rt/src/arbiter.rs index eff10ca3..9a5f1f93 100644 --- a/actix-rt/src/arbiter.rs +++ b/actix-rt/src/arbiter.rs @@ -134,10 +134,7 @@ impl Arbiter { .unbounded_send(SystemCommand::RegisterArbiter(id, arb)); // run loop - let _ = match rt.block_on(stop_rx) { - Ok(code) => code, - Err(_) => 1, - }; + let _ = rt.block_on(stop_rx).unwrap_or(1); // unregister arbiter let _ = System::current() diff --git a/actix-rt/src/lib.rs b/actix-rt/src/lib.rs index bf9094c9..ad76929c 100644 --- a/actix-rt/src/lib.rs +++ b/actix-rt/src/lib.rs @@ -15,10 +15,6 @@ pub use self::builder::{Builder, SystemRunner}; pub use self::runtime::Runtime; pub use self::system::System; -#[doc(hidden)] -#[cfg(feature = "blocking")] -pub use actix_threadpool as blocking; - /// Spawns a future on the current arbiter. /// /// # Panics