Struct shred::Dispatcher
[−]
[src]
pub struct Dispatcher<'c, 't, C = ()> { /* fields omitted */ }
The dispatcher struct, allowing systems to be executed in parallel.
Methods
impl<'c, 't, C> Dispatcher<'c, 't, C> where
C: Clone + Send + 'c,
[src]
C: Clone + Send + 'c,
fn dispatch(&mut self, res: &mut Resources, context: C)
Dispatch systems with given resources and context.
This function automatically redirects to
dispatch_par
in case theparallel
feature is setdispatch_seq
in case theparallel
feature is not set
fn dispatch_par(&mut self, res: &mut Resources, context: C)
Dispatches the systems in parallel given the resources to operate on.
This operation blocks the executing thread.
fn dispatch_seq(&mut self, res: &mut Resources, context: C)
Dispatches all systems sequentially.
This is useful if parallel overhead is too big or the platform does not support it.
Trait Implementations
impl<'c, 't, C> Debug for Dispatcher<'c, 't, C>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), FormatError>
Formats the value using the given formatter.