summaryrefslogtreecommitdiffstats
path: root/futures
diff options
context:
space:
mode:
Diffstat (limited to 'futures')
-rw-r--r--futures/Cargo.toml4
-rw-r--r--futures/src/runtime/executor.rs1
2 files changed, 4 insertions, 1 deletions
diff --git a/futures/Cargo.toml b/futures/Cargo.toml
index fe0d378c..5b303e01 100644
--- a/futures/Cargo.toml
+++ b/futures/Cargo.toml
@@ -10,12 +10,14 @@ documentation = "https://docs.rs/iced_futures"
keywords = ["gui", "ui", "graphics", "interface", "futures"]
categories = ["gui"]
+[features]
+thread-pool = ["futures/thread-pool"]
+
[dependencies]
log = "0.4"
[dependencies.futures]
version = "0.3"
-features = ["thread-pool"]
[dependencies.tokio]
version = "0.2"
diff --git a/futures/src/runtime/executor.rs b/futures/src/runtime/executor.rs
index 855aa105..eec5e231 100644
--- a/futures/src/runtime/executor.rs
+++ b/futures/src/runtime/executor.rs
@@ -8,6 +8,7 @@ pub trait Executor {
}
}
+#[cfg(feature = "thread-pool")]
impl Executor for futures::executor::ThreadPool {
fn spawn(&self, future: impl Future<Output = ()> + Send + 'static) {
self.spawn_ok(future);