pub struct Builder { /* private fields */ }Expand description
Builder struct for a ntex runtime.
Either use Builder::build to create a system and start actors.
Alternatively, use Builder::run to start the tokio runtime and
run a function in its context.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn stop_on_panic(self, stop_on_panic: bool) -> Self
pub fn stop_on_panic(self, stop_on_panic: bool) -> Self
Sets the option ‘stop_on_panic’ which controls whether the System is stopped when an uncaught panic is thrown from a worker thread.
Defaults to false.
Sourcepub fn stack_size(self, size: usize) -> Self
pub fn stack_size(self, size: usize) -> Self
Sets the size of the stack (in bytes) for the new thread.
Sourcepub fn ping_interval(self, interval: usize) -> Self
pub fn ping_interval(self, interval: usize) -> Self
Sets ping interval for spawned arbiters.
Interval is in milliseconds. By default 5000 milliseconds is set. To disable pings set value to zero.
Sourcepub fn thread_pool_limit(self, value: usize) -> Self
pub fn thread_pool_limit(self, value: usize) -> Self
Set the thread number limit of the inner thread pool, if exists. The default value is 256.
Sourcepub fn thread_pool_recv_timeout<T>(self, timeout: T) -> Self
pub fn thread_pool_recv_timeout<T>(self, timeout: T) -> Self
Set the waiting timeout of the inner thread, if exists. The default is 60 seconds.
Sourcepub fn build<R: Runner>(self, runner: R) -> SystemRunner
pub fn build<R: Runner>(self, runner: R) -> SystemRunner
Create new System.
This method panics if it can not create tokio runtime
Sourcepub fn build_with(self, config: SystemConfig) -> SystemRunner
pub fn build_with(self, config: SystemConfig) -> SystemRunner
Create new System.
This method panics if it can not create tokio runtime