Struct specs::AsyncDispatcher
source · pub struct AsyncDispatcher<'a, R> { /* private fields */ }
Expand description
Like, Dispatcher
but works asynchronously.
Implementations
sourceimpl<'a, R> AsyncDispatcher<'a, R>where
R: 'static + Borrow<Resources> + Send + Sync,
impl<'a, R> AsyncDispatcher<'a, R>where
R: 'static + Borrow<Resources> + Send + Sync,
sourcepub fn dispatch(&mut self)
pub fn dispatch(&mut self)
Dispatches the systems asynchronously. Does not execute thread local systems.
If you want to wait for the systems to finish,
call wait()
.
sourcepub fn wait(&mut self)
pub fn wait(&mut self)
Waits for all the asynchronously dispatched systems to finish and executes thread local systems (if there are any).
sourcepub fn wait_without_tl(&mut self)
pub fn wait_without_tl(&mut self)
Waits for all the asynchronously dispatched systems to finish without executing thread local systems.
See wait
for executing thread local systems.
sourcepub fn running(&mut self) -> bool
pub fn running(&mut self) -> bool
Checks if any of the asynchronously dispatched systems are running.
Auto Trait Implementations
impl<'a, R> !RefUnwindSafe for AsyncDispatcher<'a, R>
impl<'a, R> !Send for AsyncDispatcher<'a, R>
impl<'a, R> !Sync for AsyncDispatcher<'a, R>
impl<'a, R> Unpin for AsyncDispatcher<'a, R>where
R: Unpin,
impl<'a, R> !UnwindSafe for AsyncDispatcher<'a, R>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more