fast-steal 6.5.2

特别快的多线程任务调度器,支持超细颗粒度的任务窃取
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{Task, TaskQueue};

pub trait Executor {
    type Handle: Handle;
    fn execute(&self, task: Task, task_queue: TaskQueue<Self::Handle>) -> Self::Handle;
}

pub trait Handle {
    type Output;
    type Id;
    fn abort(&mut self) -> Self::Output;
    fn is_self(&mut self, id: &Self::Id) -> bool;
}