1
2
3
4
5
6
7
8
9
10
11
12
//! Asynchronous tasks.

use core::future::Future;

pub use async_task::{FallibleTask, Task};

use crate::executor::EXECUTOR;

/// Spawns a new async task that can be controlled with the returned task handle.
pub fn spawn<T>(future: impl Future<Output = T> + 'static) -> Task<T> {
    EXECUTOR.spawn(future)
}