Expand description
Local executor for the ActionQueue task queue.
This crate provides the execution infrastructure for running task attempts on the local node. It handles:
- Dispatch queue (
pool::DispatchQueue) — FIFO intake with backpressure - Attempt execution (
AttemptRunner) — Request/response pipeline with timeout enforcement and cancellation cooperation tracking - Timeout enforcement (
timeout::TimeoutGuard) — Watchdog-based timeout with panic-safe cleanup and cooperation metrics - Retry decisions (
retry::decide_retry_transition) — Cap-enforced retry logic with no N+1 paths - Backoff strategies (
backoff::BackoffStrategy) — Pluggable delay computation with overflow-safe arithmetic
§Handler Contract
Implement handler::ExecutorHandler to define task execution logic. Handlers must be
Send + Sync and should poll the handler::cancellation::CancellationToken at bounded
cadence for cooperative timeout support.
Re-exports§
pub use attempt_runner::AttemptOutcomeKind;pub use attempt_runner::AttemptOutcomeRecord;pub use attempt_runner::AttemptRunner;pub use attempt_runner::AttemptTimer;pub use attempt_runner::RetryDecisionInput;pub use attempt_runner::SystemAttemptTimer;pub use attempt_runner::TimeoutCadencePolicy;pub use attempt_runner::TimeoutCooperation;pub use attempt_runner::TimeoutCooperationMetrics;pub use attempt_runner::TimeoutCooperationMetricsSnapshot;pub use attempt_runner::TimeoutEnforcementReport;pub use backoff::BackoffConfigError;pub use backoff::BackoffStrategy;pub use backoff::ExponentialBackoff;pub use backoff::FixedBackoff;pub use children::ChildState;pub use children::ChildrenSnapshot;pub use handler::AttemptMetadata;pub use handler::ExecutorContext;pub use handler::ExecutorHandler;pub use handler::HandlerInput;pub use handler::HandlerOutput;pub use handler::TaskSubmissionPort;pub use handler::CancellationContext;pub use handler::CancellationToken;pub use identity::ExecutorIdentity;pub use identity::LocalExecutorIdentity;pub use pool::DispatchQueue;pub use pool::DispatchQueueError;pub use retry::can_retry;pub use retry::decide_retry_transition;pub use retry::RetryDecision;pub use retry::RetryDecisionError;pub use timeout::classify_timeout;pub use timeout::GuardedExecution;pub use timeout::SystemTimeoutClock;pub use timeout::TimeoutClassification;pub use timeout::TimeoutClock;pub use timeout::TimeoutFailure;pub use timeout::TimeoutGuard;pub use timeout::TimeoutReasonCode;pub use types::ExecutorRequest;pub use types::ExecutorResponse;
Modules§
- attempt_
runner - Attempt runner for local executor orchestration.
- backoff
- Backoff strategies for retry delay computation.
- children
- Dispatch-time snapshot of child task states.
- handler
- Executor handler trait and related types for attempt-level execution.
- identity
- Executor identity abstraction for lease ownership.
- pool
- Bounded, single-threaded dispatch queue for attempt coordination. This type is NOT thread-safe. For concurrent access, wrap in a Mutex.
- retry
- Retry transition helper for attempt outcomes.
- timeout
- Timeout classification and enforcement APIs.
- types
- Executor request and response contracts for attempt-level execution.