Struct simple_parallel::pool::JobHandle [] [src]

pub struct JobHandle<'pool, 'f> {
    // some fields omitted
}

A token representing a job submitted to the thread pool.

This helps ensure that a job is finished before borrowed resources in the job (and the pool itself) are invalidated.

If the job panics, this handle will ensure the main thread also panics (either via wait or in the destructor).

Methods

impl<'pool, 'f> JobHandle<'pool, 'f>

fn wait(&self)

Block until the job is finished.

Panics

This will panic if the job panicked.

Trait Implementations

impl<'pool, 'f> Drop for JobHandle<'pool, 'f>

fn drop(&mut self)