pub struct AsyncConfig {
pub worker_count: Option<usize>,
pub max_epoch_hold_ms: u64,
pub cancel_grace_ms: u64,
}Expand description
Configuration for RealtimeAsyncWorld.
Controls the egress worker pool size and epoch-hold budget that governs the shutdown state machine and stalled-worker detection.
Fields§
§worker_count: Option<usize>Number of egress worker threads. None = auto-detect
(available_parallelism / 2, clamped to [2, 16]).
max_epoch_hold_ms: u64Maximum milliseconds a worker may hold an epoch pin before being considered stalled and forcibly unpinned. Default: 100.
cancel_grace_ms: u64Grace period (ms) after cancellation before the worker is forcibly unpinned. Default: 10.
Implementations§
Source§impl AsyncConfig
impl AsyncConfig
Sourcepub fn resolved_worker_count(&self) -> usize
pub fn resolved_worker_count(&self) -> usize
Resolve the actual worker count, applying auto-detection if None.
Explicit values are clamped to [1, 64]. Zero workers would
create an unusable world (no egress threads to service observations).
Trait Implementations§
Source§impl Clone for AsyncConfig
impl Clone for AsyncConfig
Source§fn clone(&self) -> AsyncConfig
fn clone(&self) -> AsyncConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AsyncConfig
impl Debug for AsyncConfig
Auto Trait Implementations§
impl Freeze for AsyncConfig
impl RefUnwindSafe for AsyncConfig
impl Send for AsyncConfig
impl Sync for AsyncConfig
impl Unpin for AsyncConfig
impl UnwindSafe for AsyncConfig
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