vexide_async/
task.rs

1//! Asynchronous tasks.
2
3use core::future::Future;
4
5pub use async_task::{FallibleTask, Task};
6
7use crate::executor::EXECUTOR;
8
9/// Spawns a new async task that can be controlled with the returned task handle.
10pub fn spawn<T>(future: impl Future<Output = T> + 'static) -> Task<T> {
11    EXECUTOR.spawn(future)
12}