seal_rs 0.2.0

Set of classic asynchronous primitives (Actors, Executors, Futures / Promises)
Documentation
1
2
3
4
5
6
7
8
9
use std::sync::{Mutex, Arc};

pub type ExecutorTask = Arc<Mutex<Fn() -> () + Send>>;

pub trait ExecutionContext {
    fn register_for_execution(self: &mut Self, bid: i32, f: ExecutorTask);

    fn run(self: &mut Self);
}