summaryrefslogtreecommitdiffstats
path: root/futures/src/executor.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-01-31 17:01:19 +0700
committerLibravatar GitHub <noreply@github.com>2022-01-31 17:01:19 +0700
commite4ef29ef20724c3d1a4beff39ddfdaf6d45f9683 (patch)
tree6e0c9c38366c9d70204c80fc66bd8e8a7652cf52 /futures/src/executor.rs
parentc75ed37148b019358b0297171cf31b2577eeb9ae (diff)
parent6f604ab3995cb345aacf183a569589988aa3ad1f (diff)
downloadiced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.tar.gz
iced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.tar.bz2
iced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.zip
Merge pull request #1096 from pacmancoder/feat/wgpu-webgl
Experimental WebGL wgpu backend support
Diffstat (limited to 'futures/src/executor.rs')
-rw-r--r--futures/src/executor.rs42
1 files changed, 2 insertions, 40 deletions
diff --git a/futures/src/executor.rs b/futures/src/executor.rs
index 23682f32..5ac76081 100644
--- a/futures/src/executor.rs
+++ b/futures/src/executor.rs
@@ -1,38 +1,5 @@
//! Choose your preferred executor to power a runtime.
-mod null;
-
-#[cfg(all(not(target_arch = "wasm32"), feature = "thread-pool"))]
-mod thread_pool;
-
-#[cfg(all(not(target_arch = "wasm32"), feature = "tokio"))]
-mod tokio;
-
-#[cfg(all(not(target_arch = "wasm32"), feature = "async-std"))]
-mod async_std;
-
-#[cfg(all(not(target_arch = "wasm32"), feature = "smol"))]
-mod smol;
-
-#[cfg(target_arch = "wasm32")]
-mod wasm_bindgen;
-
-pub use null::Null;
-
-#[cfg(all(not(target_arch = "wasm32"), feature = "thread-pool"))]
-pub use thread_pool::ThreadPool;
-
-#[cfg(all(not(target_arch = "wasm32"), feature = "tokio"))]
-pub use self::tokio::Tokio;
-
-#[cfg(all(not(target_arch = "wasm32"), feature = "async-std"))]
-pub use self::async_std::AsyncStd;
-
-#[cfg(all(not(target_arch = "wasm32"), feature = "smol"))]
-pub use self::smol::Smol;
-
-#[cfg(target_arch = "wasm32")]
-pub use wasm_bindgen::WasmBindgen;
-
+use crate::MaybeSend;
use futures::Future;
/// A type that can run futures.
@@ -43,12 +10,7 @@ pub trait Executor: Sized {
Self: Sized;
/// Spawns a future in the [`Executor`].
- #[cfg(not(target_arch = "wasm32"))]
- fn spawn(&self, future: impl Future<Output = ()> + Send + 'static);
-
- /// Spawns a local future in the [`Executor`].
- #[cfg(target_arch = "wasm32")]
- fn spawn(&self, future: impl Future<Output = ()> + 'static);
+ fn spawn(&self, future: impl Future<Output = ()> + MaybeSend + 'static);
/// Runs the given closure inside the [`Executor`].
///