pub trait BackgroundQueue: Send + Sync + Sized + 'static {
    type Task: Send + Sync + Sized + 'static;
    type impl_trait_batch_process_0<'async_trait, const N: usize>: Future<Output = ()> + 'async_trait + Send;

    // Required method
    fn batch_process<'async_trait, const N: usize>(
        tasks: UnboundedSlice<'async_trait, Self::Task, N>
    ) -> Self::impl_trait_batch_process_0<'async_trait, N>;

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

Fire and forget auto-batched queue

Required Associated Types§

source

type Task: Send + Sync + Sized + 'static

source

type impl_trait_batch_process_0<'async_trait, const N: usize>: Future<Output = ()> + 'async_trait + Send

Required Methods§

source

fn batch_process<'async_trait, const N: usize>( tasks: UnboundedSlice<'async_trait, Self::Task, N> ) -> Self::impl_trait_batch_process_0<'async_trait, N>

Provided Methods§

source

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

Implementors§