mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
chore: remove internal io-readiness cargo feature (#2878)
This commit is contained in:
parent
a1d0681cd2
commit
ffa5bdb22d
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -150,11 +150,11 @@ jobs:
|
|||||||
run: cargo install cargo-hack
|
run: cargo install cargo-hack
|
||||||
|
|
||||||
- name: check --each-feature
|
- name: check --each-feature
|
||||||
run: cargo hack check --all --each-feature --skip io-driver,io-readiness -Z avoid-dev-deps
|
run: cargo hack check --all --each-feature --skip io-driver -Z avoid-dev-deps
|
||||||
|
|
||||||
# Try with unstable feature flags
|
# Try with unstable feature flags
|
||||||
- name: check --each-feature --unstable
|
- name: check --each-feature --unstable
|
||||||
run: cargo hack check --all --each-feature --skip io-driver,io-readiness -Z avoid-dev-deps
|
run: cargo hack check --all --each-feature --skip io-driver -Z avoid-dev-deps
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
|
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
|
||||||
|
|
||||||
|
@ -51,7 +51,6 @@ blocking = ["rt-core"]
|
|||||||
dns = ["rt-core"]
|
dns = ["rt-core"]
|
||||||
fs = ["rt-core", "io-util"]
|
fs = ["rt-core", "io-util"]
|
||||||
io-driver = ["mio", "lazy_static"] # internal only
|
io-driver = ["mio", "lazy_static"] # internal only
|
||||||
io-readiness = [] # internal only
|
|
||||||
io-util = ["memchr"]
|
io-util = ["memchr"]
|
||||||
# stdin, stdout, stderr
|
# stdin, stdout, stderr
|
||||||
io-std = ["rt-core"]
|
io-std = ["rt-core"]
|
||||||
@ -86,8 +85,8 @@ sync = ["fnv"]
|
|||||||
test-util = []
|
test-util = []
|
||||||
tcp = ["io-driver", "iovec"]
|
tcp = ["io-driver", "iovec"]
|
||||||
time = ["slab"]
|
time = ["slab"]
|
||||||
udp = ["io-driver", "io-readiness"]
|
udp = ["io-driver"]
|
||||||
uds = ["io-driver", "io-readiness", "mio-uds", "libc"]
|
uds = ["io-driver", "mio-uds", "libc"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tokio-macros = { version = "0.3.0", path = "../tokio-macros", optional = true }
|
tokio-macros = { version = "0.3.0", path = "../tokio-macros", optional = true }
|
||||||
|
@ -26,12 +26,13 @@ pub(crate) struct ScheduledIo {
|
|||||||
waiters: Mutex<Waiters>,
|
waiters: Mutex<Waiters>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "io-readiness")]
|
cfg_io_readiness! {
|
||||||
type WaitList = LinkedList<Waiter, <Waiter as linked_list::Link>::Target>;
|
type WaitList = LinkedList<Waiter, <Waiter as linked_list::Link>::Target>;
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
struct Waiters {
|
struct Waiters {
|
||||||
#[cfg(feature = "io-readiness")]
|
#[cfg(any(feature = "udp", feature = "uds"))]
|
||||||
/// List of all current waiters
|
/// List of all current waiters
|
||||||
list: WaitList,
|
list: WaitList,
|
||||||
|
|
||||||
@ -208,7 +209,7 @@ impl ScheduledIo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "io-readiness")]
|
#[cfg(any(feature = "udp", feature = "uds"))]
|
||||||
{
|
{
|
||||||
// check list of waiters
|
// check list of waiters
|
||||||
for waiter in waiters
|
for waiter in waiters
|
||||||
|
@ -146,7 +146,7 @@ macro_rules! cfg_not_io_driver {
|
|||||||
macro_rules! cfg_io_readiness {
|
macro_rules! cfg_io_readiness {
|
||||||
($($item:item)*) => {
|
($($item:item)*) => {
|
||||||
$(
|
$(
|
||||||
#[cfg(feature = "io-readiness")]
|
#[cfg(any(feature = "udp", feature = "uds"))]
|
||||||
$item
|
$item
|
||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user