pub struct DispatcherFrame { /* private fields */ }Expand description
Represents an execution loop in the Dispatcher.
Frames are shared handles: set_continue can be
called from any thread.
Implementations§
Source§impl DispatcherFrame
impl DispatcherFrame
Sourcepub fn new() -> Arc<DispatcherFrame> ⓘ
pub fn new() -> Arc<DispatcherFrame> ⓘ
Constructs a new instance of the frame for the current dispatcher. The frame exits when all frames are requested to exit.
Sourcepub fn with_exit_when_requested(
exit_when_requested: bool,
) -> Arc<DispatcherFrame> ⓘ
pub fn with_exit_when_requested( exit_when_requested: bool, ) -> Arc<DispatcherFrame> ⓘ
Constructs a new instance of the frame for the current dispatcher.
exit_when_requested indicates whether or not this frame will exit
when all frames are requested to exit. Dispatcher frames typically
break down into two categories:
- Long running, general purpose frames, that exit only when told to. These frames should exit when requested.
- Short running, very specific frames that exit themselves when an important criteria is met. These frames may consider not exiting when requested in favor of waiting for their important criteria to be met. These frames should have a timeout associated with them.
Sourcepub fn dispatcher(&self) -> &Arc<Dispatcher> ⓘ
pub fn dispatcher(&self) -> &Arc<Dispatcher> ⓘ
The dispatcher this frame runs on.
Sourcepub fn set_continue(&self, value: bool)
pub fn set_continue(&self, value: bool)
Sets whether this dispatcher frame should continue. Setting it to
false exits the loop the frame is running.
Auto Trait Implementations§
impl !Freeze for DispatcherFrame
impl RefUnwindSafe for DispatcherFrame
impl Send for DispatcherFrame
impl Sync for DispatcherFrame
impl Unpin for DispatcherFrame
impl UnsafeUnpin for DispatcherFrame
impl UnwindSafe for DispatcherFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more