Struct parsec::Scheduler
[−]
[src]
pub struct Scheduler { pub world: Arc<World>, // some fields omitted }
System execution scheduler. Allows running systems via closures, distributes the load in parallel using a thread pool.
Fields
world: Arc<World>
Shared World.
Methods
impl Scheduler
[src]
fn new(world: World, num_threads: usize) -> Scheduler
Create a new scheduler, given the world and the thread count.
fn run<F>(&mut self, functor: F) where F: 'static + Send + FnOnce(RunArg)
Run a custom system.
fn wait(&mut self)
Wait for all the currently executed systems to finish.