Skip to main content

rskit_worker/
lib.rs

1//! Bounded async worker pool with streaming events and cooperative cancellation.
2
3#![warn(missing_docs)]
4
5/// Provider/handler bridge adapters for interoperability with `rskit-provider`.
6pub mod bridge;
7/// Task dispatch strategies (e.g. round-robin).
8pub mod dispatch;
9/// Event types emitted by tasks during execution.
10pub mod event;
11/// [`Handler`] trait implemented by task executors.
12pub mod handler;
13/// [`Pool`] and [`PoolConfig`] for managing concurrent task execution.
14pub mod pool;
15/// Task specs and scheduling helpers built on the worker pool.
16pub mod scheduler;
17/// [`TaskHandle`] returned to callers after task submission.
18pub mod task;
19
20pub use bridge::{as_provider, from_provider};
21pub use dispatch::{DispatchStrategy, RoundRobinDispatcher};
22pub use event::{Event, EventKind, Progress};
23pub use handler::Handler;
24pub use pool::{OverflowPolicy, Pool, PoolConfig, PoolStats};
25pub use scheduler::{
26    ExecutionPlan, ResourceRequirements, Scheduler, SchedulerConfig, SchedulingDecision, TaskBatch,
27    TaskSpec, WorkerScheduler,
28};
29pub use task::TaskHandle;
30
31#[cfg(test)]
32mod tests;