pub struct RunControl { /* private fields */ }Expand description
Collaborative drain control for graceful shutdown
Allows requesting that the graph stop at the next superstep boundary after saving a checkpoint.
Implementations§
Source§impl RunControl
impl RunControl
Sourcepub fn request_drain(&self, reason: &str)
pub fn request_drain(&self, reason: &str)
Sourcepub fn drain_requested(&self) -> bool
pub fn drain_requested(&self) -> bool
Check if drain has been requested
§Panics
Panics if the internal mutex is poisoned (indicates a programming error).
Sourcepub fn drain_reason(&self) -> Option<String>
pub fn drain_reason(&self) -> Option<String>
Get the drain reason if set
§Panics
Panics if the internal mutex is poisoned (indicates a programming error).
Trait Implementations§
Source§impl Clone for RunControl
impl Clone for RunControl
Source§impl Debug for RunControl
impl Debug for RunControl
Auto Trait Implementations§
impl Freeze for RunControl
impl RefUnwindSafe for RunControl
impl Send for RunControl
impl Sync for RunControl
impl Unpin for RunControl
impl UnsafeUnpin for RunControl
impl UnwindSafe for RunControl
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