From 167be45a7db7c1f60a79116766bdf38300429c6a Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 28 Jan 2022 18:24:07 +0700 Subject: Split `iced_futures` into different `backend` implementations --- futures/src/executor/tokio.rs | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 futures/src/executor/tokio.rs (limited to 'futures/src/executor/tokio.rs') 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 { - tokio::runtime::Runtime::new() - } - - fn spawn(&self, future: impl Future + Send + 'static) { - let _ = tokio::runtime::Runtime::spawn(self, future); - } - - fn enter(&self, f: impl FnOnce() -> R) -> R { - let _guard = tokio::runtime::Runtime::enter(self); - f() - } -} -- cgit