pub trait TaskQueue: Send + Sync + Sized + 'static {
    type Task: Send + Sync + Sized + 'static;
    type Value: Send;

    // Required method
    fn batch_process<const N: usize>(
        assignment: PendingAssignment<'_, Self, N>
    ) -> impl Future<Output = CompletionReceipt<Self>> + Send;

    // Provided method
    fn auto_batch<const N: usize>(task: Self::Task) -> BatchedTask<Self, N> 
       where Self: LocalQueue<N, BufferCell = TaskRef<Self>> { ... }
}
Expand description

Auto-batched queue whereby each task resolves to a value

Required Associated Types§

source

type Task: Send + Sync + Sized + 'static

source

type Value: Send

Required Methods§

source

fn batch_process<const N: usize>( assignment: PendingAssignment<'_, Self, N> ) -> impl Future<Output = CompletionReceipt<Self>> + Send

Provided Methods§

source

fn auto_batch<const N: usize>(task: Self::Task) -> BatchedTask<Self, N>
where Self: LocalQueue<N, BufferCell = TaskRef<Self>>,

Object Safety§

This trait is not object safe.

Implementors§