pub struct PrewarmHandle { /* private fields */ }Expand description
Handle to a running prewarm pass. See ContentAddressedMount::prewarm.
Implementations§
Source§impl PrewarmHandle
impl PrewarmHandle
Sourcepub fn cancel(&self)
pub fn cancel(&self)
Signal cancellation. Workers exit at the next poll point.
Non-blocking; pair with Self::wait if you want to be
sure the threads have actually stopped.
Sourcepub fn wait(self) -> PrewarmStats
pub fn wait(self) -> PrewarmStats
Block until the prewarm pass finishes (naturally or via cancel) and return its stats. Returns the default-zero stats if the coordinator thread couldn’t be spawned.
Trait Implementations§
Source§impl Drop for PrewarmHandle
impl Drop for PrewarmHandle
Auto Trait Implementations§
impl !RefUnwindSafe for PrewarmHandle
impl !UnwindSafe for PrewarmHandle
impl Freeze for PrewarmHandle
impl Send for PrewarmHandle
impl Sync for PrewarmHandle
impl Unpin for PrewarmHandle
impl UnsafeUnpin for PrewarmHandle
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