[][src]Trait brotli::enc::threading::BatchSpawnable

pub trait BatchSpawnable<ReturnValue: Send + 'static, ExtraInput: Send + 'static, Alloc: BrotliAlloc + Send + 'static, U: Send + 'static + Sync> where
    <Alloc as Allocator<u8>>::AllocatedMemory: Send + 'static, 
{ type JoinHandle: Joinable<ReturnValue, BrotliEncoderThreadError>; type FinalJoinHandle: OwnedRetriever<U>; fn make_spawner(&mut self, input: &mut Owned<U>) -> Self::FinalJoinHandle;
fn spawn<F: Fn(ExtraInput, usize, usize, &U, Alloc) -> ReturnValue + Send + 'static + Copy>(
        &mut self,
        handle: &mut Self::FinalJoinHandle,
        alloc: &mut SendAlloc<ReturnValue, ExtraInput, Alloc, Self::JoinHandle>,
        index: usize,
        num_threads: usize,
        f: F
    ); }

Associated Types

type JoinHandle: Joinable<ReturnValue, BrotliEncoderThreadError>

type FinalJoinHandle: OwnedRetriever<U>

Loading content...

Required methods

fn make_spawner(&mut self, input: &mut Owned<U>) -> Self::FinalJoinHandle

fn spawn<F: Fn(ExtraInput, usize, usize, &U, Alloc) -> ReturnValue + Send + 'static + Copy>(
    &mut self,
    handle: &mut Self::FinalJoinHandle,
    alloc: &mut SendAlloc<ReturnValue, ExtraInput, Alloc, Self::JoinHandle>,
    index: usize,
    num_threads: usize,
    f: F
)

Loading content...

Implementors

impl<ReturnValue: Send + 'static, ExtraInput: Send + 'static, Alloc: BrotliAlloc + Send + 'static, U: Send + 'static + Sync> BatchSpawnable<ReturnValue, ExtraInput, Alloc, U> for MultiThreadedSpawner where
    <Alloc as Allocator<u8>>::AllocatedMemory: Send + 'static, 
[src]

type JoinHandle = MultiThreadedJoinable<ReturnValue, BrotliEncoderThreadError>

type FinalJoinHandle = Arc<RwLock<U>>

impl<ReturnValue: Send + 'static, ExtraInput: Send + 'static, Alloc: BrotliAlloc + Send + 'static, U: Send + 'static + Sync> BatchSpawnable<ReturnValue, ExtraInput, Alloc, U> for SingleThreadedSpawner where
    <Alloc as Allocator<u8>>::AllocatedMemory: Send + 'static, 
[src]

type JoinHandle = SingleThreadedJoinable<ReturnValue, BrotliEncoderThreadError>

type FinalJoinHandle = SingleThreadedOwnedRetriever<U>

Loading content...