[−][src]Trait shred::RunWithPool
Similar to RunNow
except additionally taking in a rayon::ThreadPool
for parallelism.
Required methods
fn setup(&mut self, world: &mut World)
Sets up World
for a later call to run
.
fn run(&mut self, world: &'a World, pool: &ThreadPool)
Runs the system/group of systems. Possibly in parallel depending on how the structure is set up.
Panics
Panics if the system tries to fetch resources which are borrowed in an incompatible way already (tries to read from a resource which is already written to or tries to write to a resource which is read from).
fn reads(&self, reads: &mut Vec<ResourceId>)
Accumulates the necessary read/shared resources from the systems in this group.
fn writes(&self, writes: &mut Vec<ResourceId>)
Accumulates the necessary write/exclusive resources from the systems in this group.
Implementors
impl<'a, H, T> RunWithPool<'a> for Par<H, T> where
H: RunWithPool<'a> + Send,
T: RunWithPool<'a> + Send,
[src]
H: RunWithPool<'a> + Send,
T: RunWithPool<'a> + Send,
fn setup(&mut self, world: &mut World)
[src]
fn run(&mut self, world: &'a World, pool: &ThreadPool)
[src]
fn reads(&self, reads: &mut Vec<ResourceId>)
[src]
fn writes(&self, writes: &mut Vec<ResourceId>)
[src]
impl<'a, H, T> RunWithPool<'a> for Seq<H, T> where
H: RunWithPool<'a>,
T: RunWithPool<'a>,
[src]
H: RunWithPool<'a>,
T: RunWithPool<'a>,
fn setup(&mut self, world: &mut World)
[src]
fn run(&mut self, world: &'a World, pool: &ThreadPool)
[src]
fn reads(&self, reads: &mut Vec<ResourceId>)
[src]
fn writes(&self, writes: &mut Vec<ResourceId>)
[src]
impl<'a, T> RunWithPool<'a> for T where
T: System<'a>,
[src]
T: System<'a>,