Struct amethyst::ecs::shred::Par [−]
pub struct Par<H, T> { /* fields omitted */ }Runs two tasks in parallel.
These two tasks are called head and tail
in the following documentation.
Methods
impl<H> Par<H, Nil>
impl<H> Par<H, Nil>pub fn new(head: H) -> Par<H, Nil>
pub fn new(head: H) -> Par<H, Nil>Creates a new Par struct, with the tail being a no-op.
pub fn with<T>(self, sys: T) -> Par<Par<H, T>, Nil> where
H: RunWithPool<'a>,
T: RunWithPool<'a>,
pub fn with<T>(self, sys: T) -> Par<Par<H, T>, Nil> where
H: RunWithPool<'a>,
T: RunWithPool<'a>, Adds sys as the second job and returns a new Par struct
with the previous struct as head and a no-op tail.
Trait Implementations
impl<'a, H, T> RunWithPool<'a> for Par<H, T> where
H: RunWithPool<'a> + Send,
T: RunWithPool<'a> + Send,
impl<'a, H, T> RunWithPool<'a> for Par<H, T> where
H: RunWithPool<'a> + Send,
T: RunWithPool<'a> + Send, fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)Sets up Resources for a later call to run.
fn run(&mut self, res: &'a Resources, pool: &ThreadPool)
fn run(&mut self, res: &'a Resources, pool: &ThreadPool)Runs the system/group of systems. Possibly in parallel depending on how the structure is set up. Read more
fn reads(&self, reads: &mut Vec<ResourceId>)
fn reads(&self, reads: &mut Vec<ResourceId>)Accumulates the necessary read/shared resources from the systems in this group. Read more
fn writes(&self, writes: &mut Vec<ResourceId>)
fn writes(&self, writes: &mut Vec<ResourceId>)Accumulates the necessary write/exclusive resources from the systems in this group. Read more