Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: task::scope #2576

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ full = [
"rt-core",
"rt-util",
"rt-threaded",
"scope",
"signal",
"stream",
"sync",
"time",
"futures"
]

blocking = ["rt-core"]
Expand Down Expand Up @@ -73,6 +75,7 @@ rt-threaded = [
"num_cpus",
"rt-core",
]
scope = []
signal = [
"io-driver",
"lazy_static",
Expand All @@ -99,6 +102,7 @@ pin-project-lite = "0.1.1"
# Everything else is optional...
fnv = { version = "1.0.6", optional = true }
futures-core = { version = "0.3.0", optional = true }
futures = { version = "0.3.0", optional = true }
lazy_static = { version = "1.0.2", optional = true }
memchr = { version = "2.2", optional = true }
mio = { version = "0.6.20", optional = true }
Expand All @@ -122,7 +126,7 @@ optional = true

[dev-dependencies]
tokio-test = { version = "0.2.0", path = "../tokio-test" }
futures = { version = "0.3.0", features = ["async-await"] }
futures = { version = "0.3.0", features = ["async-await", "executor"] }
futures-test = "0.3.0"
proptest = "0.9.4"
tempfile = "3.1.0"
Expand Down
10 changes: 10 additions & 0 deletions tokio/src/macros/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,16 @@ macro_rules! cfg_process {
}
}

macro_rules! cfg_scope {
($($item:item)*) => {
$(
#[cfg(feature = "scope")]
#[cfg_attr(docsrs, doc(cfg(feature = "scope")))]
$item
)*
}
}

macro_rules! cfg_signal {
($($item:item)*) => {
$(
Expand Down
5 changes: 5 additions & 0 deletions tokio/src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ cfg_sync! {
mod task;
pub(crate) use task::AtomicWaker;

cfg_unstable! {
mod wait_group;
pub(crate) use wait_group::{SharedWaitGroup};
}

pub mod watch;
}

Expand Down
Loading