add blocking feature flag for actix-rt

This commit is contained in:
fakeshadow 2020-11-23 20:54:28 +08:00
parent 704af672b9
commit 939c761acb
2 changed files with 8 additions and 3 deletions

View File

@ -15,12 +15,16 @@ edition = "2018"
name = "actix_rt"
path = "src/lib.rs"
[features]
default = ["blocking"]
blocking = ["actix-threadpool"]
[dependencies]
actix-macros = "0.1.0"
actix-threadpool = "0.3"
futures-channel = { version = "0.3.4", default-features = false }
futures-util = { version = "0.3.4", default-features = false, features = ["alloc"] }
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"] }
smallvec = "1"
tokio = { version = "0.2.6", default-features = false, features = ["rt-core", "rt-util", "io-driver", "tcp", "uds", "udp", "time", "signal", "stream"] }

View File

@ -16,6 +16,7 @@ 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.