summaryrefslogtreecommitdiffstats
path: root/src/native
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-20 05:43:09 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-20 05:43:09 +0100
commit04086a90c9e933ebfb42de378054e1115b33529d (patch)
treef0a9e25216807f9a20d757eadf420456d16f613f /src/native
parent90690702e1e4abab804ec91e8ff4183824bec436 (diff)
downloadiced-04086a90c9e933ebfb42de378054e1115b33529d.tar.gz
iced-04086a90c9e933ebfb42de378054e1115b33529d.tar.bz2
iced-04086a90c9e933ebfb42de378054e1115b33529d.zip
Implement `WasmBindgen` executor and reorganize
Diffstat (limited to 'src/native')
-rw-r--r--src/native/executor.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/native/executor.rs b/src/native/executor.rs
deleted file mode 100644
index 68a1d280..00000000
--- a/src/native/executor.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-//! Choose your preferred executor to power your application.
-pub use iced_winit::{executor::Null, Executor};
-use iced_winit::{executor::ThreadPool, futures};
-
-/// The default cross-platform executor.
-///
-/// - On native platforms, it will use a `ThreadPool`.
-/// - On the Web, it will use `wasm-bindgen-futures::spawn_local`.
-#[derive(Debug)]
-pub struct Default(ThreadPool);
-
-impl Executor for Default {
- fn new() -> Result<Self, futures::io::Error> {
- Ok(Default(ThreadPool::new()?))
- }
-
- fn spawn(
- &self,
- future: impl futures::Future<Output = ()> + Send + 'static,
- ) {
- self.0.spawn(future);
- }
-}