pub struct SharedRuntimeConfig {
pub async_threads: usize,
pub compute_threads: usize,
pub compute_max_in_flight: usize,
pub clock: Clock,
}Expand description
Configuration for creating a SharedRuntime.
Fields§
§async_threads: usizeNumber of worker threads for async runtime (ignored in WASM)
compute_threads: usizeNumber of worker threads for compute/actor pool (ignored in WASM)
compute_max_in_flight: usizeMaximum concurrent compute tasks (ignored in WASM)
clock: ClockClock for time operations (defaults to real system clock)
Implementations§
Sourcepub fn async_threads(self, threads: usize) -> Self
pub fn async_threads(self, threads: usize) -> Self
Set the number of async worker threads.
Sourcepub fn compute_threads(self, threads: usize) -> Self
pub fn compute_threads(self, threads: usize) -> Self
Set the number of compute worker threads.
Sourcepub fn compute_max_in_flight(self, max: usize) -> Self
pub fn compute_max_in_flight(self, max: usize) -> Self
Set the maximum number of in-flight compute tasks.
Sourcepub fn mock_clock(self, initial_millis: u64) -> Self
pub fn mock_clock(self, initial_millis: u64) -> Self
Use a mock clock starting at the given milliseconds.
Sourcepub fn actor_system_config(&self) -> ActorSystemConfig
pub fn actor_system_config(&self) -> ActorSystemConfig
Derive an ActorSystemConfig from this runtime config.
Trait Implementations§
Source§fn clone(&self) -> SharedRuntimeConfig
fn clone(&self) -> SharedRuntimeConfig
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 moreAuto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more