Trait deque_loader::task::TaskHandler[][src]

pub trait TaskHandler: Sized + Send + Sync + 'static {
    type Key: Key;
    type Value: Send + Sync + Clone + 'static;
    type Error: Send + Sync + Clone + 'static;

    const CORES_PER_WORKER_GROUP: usize;

    fn handle_task<'async_trait>(
        task: Task<PendingAssignment<Self>>
    ) -> Pin<Box<dyn Future<Output = Task<CompletionReceipt>> + Send + 'async_trait>>
    where
        Self: 'async_trait
; }
Expand description

A type-state control flow for driving tasks from assignment to completion. As task assignment can be deferred until connection acquisition and likewise loads batched by key, this enables opportunistic batching when connection acquisition becomes a bottleneck and also enables connection yielding as a consequence of work cancellation

Associated Types

Associated Constants

Required methods

Implementors