diff options
author | 2022-01-28 18:24:07 +0700 | |
---|---|---|
committer | 2022-01-28 21:37:17 +0700 | |
commit | 167be45a7db7c1f60a79116766bdf38300429c6a (patch) | |
tree | 5af48807c8d90a73775fef68a51ae549880aa388 /futures/src/executor/tokio.rs | |
parent | 5dab5a327ef643ee38ac3e42ab35212fff445631 (diff) | |
download | iced-167be45a7db7c1f60a79116766bdf38300429c6a.tar.gz iced-167be45a7db7c1f60a79116766bdf38300429c6a.tar.bz2 iced-167be45a7db7c1f60a79116766bdf38300429c6a.zip |
Split `iced_futures` into different `backend` implementations
Diffstat (limited to 'futures/src/executor/tokio.rs')
-rw-r--r-- | futures/src/executor/tokio.rs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/futures/src/executor/tokio.rs b/futures/src/executor/tokio.rs deleted file mode 100644 index c6a21cec..00000000 --- a/futures/src/executor/tokio.rs +++ /dev/null @@ -1,22 +0,0 @@ -use crate::Executor; - -use futures::Future; - -/// A `tokio` runtime. -#[cfg_attr(docsrs, doc(cfg(feature = "tokio")))] -pub type Tokio = tokio::runtime::Runtime; - -impl Executor for Tokio { - fn new() -> Result<Self, futures::io::Error> { - tokio::runtime::Runtime::new() - } - - fn spawn(&self, future: impl Future<Output = ()> + Send + 'static) { - let _ = tokio::runtime::Runtime::spawn(self, future); - } - - fn enter<R>(&self, f: impl FnOnce() -> R) -> R { - let _guard = tokio::runtime::Runtime::enter(self); - f() - } -} |