exocore_core/futures/
spawn_tokio.rs1use futures::Future;
2#[cfg(any(test, feature = "tests-utils", feature = "runtime"))]
3pub use tokio::runtime::Builder;
4#[cfg(any(test, feature = "tests-utils", feature = "runtime"))]
5pub use tokio::runtime::Runtime;
6#[cfg(any(test, feature = "tests-utils", feature = "runtime"))]
7pub use tokio::time::{interval, interval_at, sleep, sleep_until, Interval};
8pub use tokio::{self, task::spawn_blocking};
9
10pub fn spawn_future<F>(f: F)
11where
12 F: Future<Output = ()> + 'static + Send,
13{
14 tokio::spawn(f);
15}
16
17pub fn spawn_future_non_send<F>(_f: F)
18where
19 F: Future<Output = Result<(), ()>> + 'static,
20{
21 unimplemented!()
22}