clockworker 0.2.1

A single-threaded async executor with EEVDF-based fair scheduling and pluggable task schedulers
Documentation
pub type TaskId = usize;

pub trait QueueKey: Eq + Sized + Copy + Send + Sync + std::fmt::Debug + 'static {}
impl<K> QueueKey for K where K: Eq + Sized + Copy + Send + Sync + std::fmt::Debug + 'static {}

pub struct Queue<K: QueueKey> {
    id: K,
    share: u64,
}
impl<K: QueueKey> Queue<K> {
    pub fn new(id: K, share: u64) -> Self {
        Self { id, share }
    }
    pub fn id(&self) -> K {
        self.id
    }
    pub fn share(&self) -> u64 {
        self.share
    }
}