[−][src]Function ranagrams::factory::manufacture
pub fn manufacture<I, W>(
roster: usize,
slop_factor: usize,
materials: Vec<I>,
fun: Arc<W>
) -> (Receiver<Option<I>>, Arc<AtomicBool>) where
I: Send + 'static,
W: WorkerFun<I>,
Start the factory going. The roster
is the number of workers. The
slop_factor
is multiplied by this number to determine the number of
items to keep in reserve for workers that run low in their personal work
queues. The materials
are the initial items requiring improvement. The
fun
provides the specifications for what the workers will do to improve
or inspect their work.