pub struct Par<H, T> { /* private fields */ }
Expand description
Runs two tasks in parallel.
These two tasks are called head
and tail
in the following documentation.
Implementations§
Source§impl<H> Par<H, Nil>
impl<H> Par<H, Nil>
Sourcepub fn with<T>(self, sys: T) -> Par<Par<H, T>, Nil>where
H: for<'a> RunWithPool<'a>,
T: for<'a> RunWithPool<'a>,
pub fn with<T>(self, sys: T) -> Par<Par<H, T>, Nil>where
H: for<'a> RunWithPool<'a>,
T: for<'a> 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§
Source§impl<'a, H, T> RunWithPool<'a> for Par<H, T>
impl<'a, H, T> RunWithPool<'a> for Par<H, T>
Source§fn run(&mut self, world: &'a World, pool: &ThreadPool)
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. Read more
Source§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.
Source§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.
Auto Trait Implementations§
impl<H, T> Freeze for Par<H, T>
impl<H, T> RefUnwindSafe for Par<H, T>where
H: RefUnwindSafe,
T: RefUnwindSafe,
impl<H, T> Send for Par<H, T>
impl<H, T> Sync for Par<H, T>
impl<H, T> Unpin for Par<H, T>
impl<H, T> UnwindSafe for Par<H, T>where
H: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more