Skip to content

Commit f685607

Browse files
authored
Merge pull request #406 from eval-exec/exec/drop-async-runtime-features
Drop `async-runtime`,`async-timer` features
2 parents d22838b + 94162f7 commit f685607

File tree

6 files changed

+0
-317
lines changed

6 files changed

+0
-317
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ features-check:
4242
$(Change_Work_Path) && cargo build --features parking_lot
4343
$(Change_Work_Path) && cargo build --features unstable
4444
$(Change_Work_Path) && cargo build --features tokio-runtime,generic-timer,unstable --no-default-features
45-
$(Change_Work_Path) && cargo build --features async-runtime,generic-timer,unstable --no-default-features
46-
$(Change_Work_Path) && cargo build --features async-runtime,async-timer,unstable --no-default-features
4745
# required wasm32-unknown-unknown target
4846
$(Change_Work_Path) && cargo build --features wasm-timer,unstable --no-default-features --target=wasm32-unknown-unknown
4947
$(Change_Work_Path) && cargo build --features wasm-timer,unstable,secio-async-trait --no-default-features --target=wasm32-unknown-unknown

tentacle/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ parking_lot = { version = "0.12", optional = true }
3434
tokio-tungstenite = { version = "0.26", optional = true }
3535
httparse = { version = "1.9", optional = true }
3636
futures-timer = { version = "3.0.2", optional = true }
37-
async-std = { version = "1", features = ["unstable"], optional = true }
38-
async-io = { version = "1", optional = true }
3937

4038
multiaddr = { path = "../multiaddr", package = "tentacle-multiaddr", version = "0.3.4" }
4139
molecule = "0.8.0"
@@ -91,8 +89,5 @@ openssl-vendored = ["secio/openssl-vendored"]
9189
tokio-timer = ["yamux/tokio-timer", "tokio/time", "tokio-runtime"]
9290
tokio-runtime = ["tokio/io-util", "tokio/net", "tokio/rt-multi-thread"]
9391

94-
async-timer = ["async-runtime"]
95-
async-runtime = ["async-std", "async-io", "yamux/generic-timer"]
96-
9792
generic-timer = ["futures-timer", "yamux/generic-timer"]
9893
wasm-timer = ["futures-timer", "yamux/wasm", "futures-timer/wasm-bindgen"]

tentacle/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@
7878
//! - `tokio-runtime`: Enable by default, use tokio runtime
7979
//! - `tokio-timer`: Enable by default, use tokio inner timer
8080
//!
81-
//! - `async-timer`: use async-io timer
82-
//! - `async-runtime`: use async-std runtime
83-
//!
8481
//! - `generic-timer`: use futures-timer
8582
//! - `wasm-timer`: only use on Browser WebAssembly platform
8683
//!

tentacle/src/runtime/async_runtime.rs

Lines changed: 0 additions & 291 deletions
This file was deleted.

tentacle/src/runtime/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
//! this module contains async timer, compat async read/write between futures and tokio, spawn on any runtime
1010
//!
1111
12-
#[cfg(all(not(target_family = "wasm"), feature = "async-runtime"))]
13-
mod async_runtime;
1412
#[cfg(any(
1513
feature = "generic-timer",
1614
all(target_family = "wasm", feature = "wasm-timer")
@@ -21,8 +19,6 @@ mod tokio_runtime;
2119
#[cfg(target_family = "wasm")]
2220
mod wasm_runtime;
2321

24-
#[cfg(all(not(target_family = "wasm"), feature = "async-runtime"))]
25-
pub use async_runtime::*;
2622
#[cfg(any(
2723
feature = "generic-timer",
2824
all(target_family = "wasm", feature = "wasm-timer")

tentacle/src/utils/dns.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,6 @@ impl Future for DnsResolver {
128128
Ok(Err(e)) => Poll::Ready(Err((self.source_address.clone(), e))),
129129
},
130130
}
131-
132-
#[cfg(feature = "async-runtime")]
133-
match handle.poll_unpin(cx) {
134-
Poll::Pending => {
135-
self.join_handle = Some(handle);
136-
Poll::Pending
137-
}
138-
Poll::Ready(res) => match res {
139-
Ok(iter) => self.new_addr(iter),
140-
Err(e) => Poll::Ready(Err((self.source_address.clone(), e.into()))),
141-
},
142-
}
143131
}
144132
}
145133

0 commit comments

Comments
 (0)