Struct jobsteal::Spawner
[−]
[src]
pub struct Spawner<'pool, 'scope> { // some fields omitted }
A job spawner associated with a specific scope. Jobs spawned using this may spawn new jobs with the same lifetime.
Methods
impl<'pool, 'scope> Spawner<'pool, 'scope>
[src]
fn submit<F>(&self, f: F) where F: 'scope + Send + FnOnce(&Spawner<'pool, 'scope>)
Execute a function which necessarily outlives the scope which this resides in.
fn scope<'new, F>(&self, f: F) where 'scope: 'new, F: FnOnce(&Spawner<'pool, 'new>)
Construct a new spawning scope smaller than the one this spawner resides in.