pub struct MigrationGuard<'a> { /* private fields */ }Expand description
Guard for the migration coordinator. Wraps the migrate-then-drain
sequence: begin bumps the generation and swaps the tag,
wait_quiescent drains the old generation. The drain is explicit -
the guard does NOT drain on drop.
Implementations§
Source§impl<'a> MigrationGuard<'a>
impl<'a> MigrationGuard<'a>
Sourcepub fn begin(header: &'a HandshakeHeader, new_tag: u32) -> Self
pub fn begin(header: &'a HandshakeHeader, new_tag: u32) -> Self
Begin a migration. new_tag is the strategy tag to install.
Sourcepub fn wait_quiescent(&self)
pub fn wait_quiescent(&self)
Wait for in-flight ops on the old generation to complete.
pub fn old_generation(&self) -> u32
Auto Trait Implementations§
impl<'a> Freeze for MigrationGuard<'a>
impl<'a> RefUnwindSafe for MigrationGuard<'a>
impl<'a> Send for MigrationGuard<'a>
impl<'a> Sync for MigrationGuard<'a>
impl<'a> Unpin for MigrationGuard<'a>
impl<'a> UnsafeUnpin for MigrationGuard<'a>
impl<'a> UnwindSafe for MigrationGuard<'a>
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