[−][src]Struct oxygengine_core::ecs::shred::Dispatcher
The dispatcher struct, allowing systems to be executed in parallel.
Implementations
impl<'a, 'b> Dispatcher<'a, 'b>
[src]
pub fn setup(&mut self, world: &mut World)
[src]
Sets up all the systems which means they are gonna add default values for the resources they need.
pub fn dispose(self, world: &mut World)
[src]
Calls the dispose
method of all systems and allows them to release
external resources. It is common this method removes components and
/ or resources from the World
which are associated with external
resources.
pub fn dispatch(&mut self, world: &World)
[src]
Dispatch all the systems with given resources and context and then run thread local systems.
This function automatically redirects to
- [Dispatcher::dispatch_par] in case it is supported
- Dispatcher::dispatch_seq otherwise
and runs dispatch_thread_local
afterwards.
Please note that this method assumes that no resource is currently borrowed. If that's the case, it panics.
pub fn dispatch_seq(&mut self, world: &World)
[src]
Dispatches the systems (except thread local systems) sequentially.
This is useful if parallel overhead is too big or the platform does not support multithreading.
Please note that this method assumes that no resource is currently borrowed. If that's the case, it panics.
pub fn dispatch_thread_local(&mut self, world: &World)
[src]
Dispatch only thread local systems sequentially.
Please note that this method assumes that no resource is currently borrowed. If that's the case, it panics.
Trait Implementations
impl<'a, 'b, 'c> RunNow<'a> for Dispatcher<'b, 'c>
[src]
Auto Trait Implementations
impl<'a, 'b> !RefUnwindSafe for Dispatcher<'a, 'b>
impl<'a, 'b> !Send for Dispatcher<'a, 'b>
impl<'a, 'b> !Sync for Dispatcher<'a, 'b>
impl<'a, 'b> Unpin for Dispatcher<'a, 'b>
impl<'a, 'b> !UnwindSafe for Dispatcher<'a, 'b>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any,
[src]
T: Any,
impl<'a, T> RunNow<'a> for T where
T: System<'a>,
[src]
T: System<'a>,
fn run_now(&mut self, world: &'a World)
[src]
fn setup(&mut self, world: &mut World)
[src]
fn dispose(self: Box<T>, world: &mut World)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,