saito_core/core/process/run_task.rs
1use std::pin::Pin;
2
3pub type RunnableTask = Pin<Box<dyn Fn() + Send + 'static>>;
4
5/// Runs a given task to completion in a platform agnostic way. In multithreaded environments can be run concurrently and in single threaded
6/// environments will run on the same thread.
7pub trait RunTask {
8 // fn run(&self, task: Pin<Box<dyn Future<Output = ()> + Send + 'static>>);
9 fn run(&self, task: RunnableTask);
10}