mod executor;
mod task;
mod uid_generator;
mod uid_waker;
mod util;
pub fn run(mut on_idle: impl FnMut()) {
while executor::poll_until_idle() {
on_idle();
}
}
pub fn spawn(future: impl std::future::Future<Output = ()> + 'static) {
let task = task::Task::new(future);
executor::add_to_poll(task);
}