pub struct AdaptiveIpcSidecar { /* private fields */ }Expand description
Background scanner thread that drives family promotions on an
AdaptiveIpc by polling AdaptiveIpc::maybe_promote on a
timer.
spawn starts the thread; shutdown stops it cleanly. The
thread polls every scan_interval, calls maybe_promote(), and
counts a promotion when the call returns Ok(Some(_)).
Implementations§
Source§impl AdaptiveIpcSidecar
impl AdaptiveIpcSidecar
Sourcepub fn spawn<T: Marshal + Copy + Send + Sync + 'static>(
ipc: Arc<AdaptiveIpc<T>>,
scan_interval: Duration,
) -> Self
pub fn spawn<T: Marshal + Copy + Send + Sync + 'static>( ipc: Arc<AdaptiveIpc<T>>, scan_interval: Duration, ) -> Self
Spawn a sidecar thread that polls ipc.maybe_promote() every
scan_interval. Each successful promotion is counted in
promotions_triggered.
Sourcepub fn promotions_triggered(&self) -> u64
pub fn promotions_triggered(&self) -> u64
Number of successful promotions the sidecar has issued since spawn.
Trait Implementations§
Source§impl Drop for AdaptiveIpcSidecar
impl Drop for AdaptiveIpcSidecar
Auto Trait Implementations§
impl !RefUnwindSafe for AdaptiveIpcSidecar
impl !UnwindSafe for AdaptiveIpcSidecar
impl Freeze for AdaptiveIpcSidecar
impl Send for AdaptiveIpcSidecar
impl Sync for AdaptiveIpcSidecar
impl Unpin for AdaptiveIpcSidecar
impl UnsafeUnpin for AdaptiveIpcSidecar
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