Struct specs::Planner
[−]
[src]
pub struct Planner { pub world: Arc<World>, // some fields omitted }
System execution planner. Allows running systems via closures, distributes the load in parallel using a thread pool.
Fields
world: Arc<World>
Shared World.
Methods
impl Planner
[src]
fn new(world: World, num_threads: usize) -> Planner
Create a new planner, 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.