Skip to main content

moirai_executor/schedule/
mod.rs

1//! Unified executor scheduling.
2//!
3//! The scheduler in this module is the single dispatch facade for synchronous,
4//! blocking, and asynchronous jobs. Sync and async-ready work use the compute
5//! worker queues; blocking work uses a bounded lane owned by the same facade.
6//! Workload shape is selected by zero-sized marker types so call sites keep
7//! static dispatch while heterogeneous jobs are stored at the executor
8//! boundary.
9
10pub mod class;
11pub mod job;
12pub mod queue;
13pub mod reduce;
14pub mod route;
15pub mod runtime;
16pub mod seam;
17pub mod wake;
18
19pub use class::{AsyncTask, BlockingTask, SyncTask, WorkClass};
20pub use route::{
21    AcceleratorCounts, AcceleratorId, AcceleratorKind, AcceleratorRoute, AcceleratorRoutePolicy,
22    AsyncLaneId, AsyncLanesPerProcess, HybridRoutePolicy, HybridRouter, ProcessCount, ProcessId,
23    ProcessRoute, RoutePolicy, RouteSummary, RouteTopology, SchedulerRoute, ServerCount, ServerId,
24    ServerRoute, ServerRoutePolicy, ThreadId, ThreadRoute, ThreadRoutePolicy, WorkerCount,
25};
26#[cfg(feature = "scheduler-diagnostics")]
27pub use runtime::{
28    ContendedWakeDecision, DiagnosticWakeDecision, EmptyWakeDecision, SaturatedWakeDecision,
29};
30pub use runtime::{
31    IdleHook, IdleHookRegistrationError, MAX_IDLE_HOOKS, ScheduleMetrics, SchedulerScope,
32    ThreadScheduler,
33};
34pub use runtime::{register_idle_hook, run_idle_hooks};
35pub use seam::{DataParallel, SchedulerControl, WorkScheduler, WorkSubmit};