hiver_runtime/scheduler/
mod.rs1pub mod handle;
9pub mod local;
10pub mod queue;
11pub mod work_stealing;
12
13pub use handle::SchedulerHandle;
14pub use local::{Scheduler, SchedulerConfig};
15pub use queue::LocalQueue;
16pub use work_stealing::{WorkStealingConfig, WorkStealingHandle, WorkStealingScheduler};
17
18use std::future::Future;
19use std::pin::Pin;
20
21pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
24
25pub type TaskId = u64;
28
29#[must_use]
32pub fn gen_task_id() -> TaskId {
33 use std::sync::atomic::{AtomicU64, Ordering};
34 static COUNTER: AtomicU64 = AtomicU64::new(1);
35 COUNTER.fetch_add(1, Ordering::Relaxed)
36}
37
38pub type RawTask = *const ();