pub struct RouterThreadOptions {
pub blocking_open: bool,
pub wait: WaitStrategy,
pub report_period: Option<Duration>,
pub report: Option<Arc<dyn Fn(RouterCounters) + Send + Sync + 'static>>,
pub pre_run: Option<Arc<dyn Fn() -> Result<()> + Send + Sync + 'static>>,
}Expand description
Options controlling router thread setup and loop behavior.
Fields§
§blocking_open: boolIf true, open the region in blocking mode (requires wake sections in layouts).
wait: WaitStrategyWhich wait strategy to use while routing.
report_period: Option<Duration>If set, report counters periodically.
report: Option<Arc<dyn Fn(RouterCounters) + Send + Sync + 'static>>Optional callback invoked with periodic counter snapshots.
pre_run: Option<Arc<dyn Fn() -> Result<()> + Send + Sync + 'static>>Optional hook called inside the router thread before opening the SHM region.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RouterThreadOptions
impl !RefUnwindSafe for RouterThreadOptions
impl Send for RouterThreadOptions
impl Sync for RouterThreadOptions
impl Unpin for RouterThreadOptions
impl !UnwindSafe for RouterThreadOptions
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