Struct ntex_server::WorkerPool
source · pub struct WorkerPool { /* private fields */ }
Expand description
Server builder
Implementations§
source§impl WorkerPool
impl WorkerPool
sourcepub fn workers(self, num: usize) -> Self
pub fn workers(self, num: usize) -> Self
Set number of workers to start.
By default server uses number of available logical cpu as workers count.
sourcepub fn stop_runtime(self) -> Self
pub fn stop_runtime(self) -> Self
Stop current ntex runtime when manager get dropped.
By default “stop runtime” is disabled.
sourcepub fn disable_signals(self) -> Self
pub fn disable_signals(self) -> Self
Disable signal handling.
By default signal handling is enabled.
sourcepub fn shutdown_timeout<T: Into<Millis>>(self, timeout: T) -> Self
pub fn shutdown_timeout<T: Into<Millis>>(self, timeout: T) -> Self
Timeout for graceful workers shutdown.
After receiving a stop signal, workers have this much time to finish serving requests. Workers still alive after the timeout are force dropped.
By default shutdown timeout sets to 30 seconds.
Trait Implementations§
source§impl Clone for WorkerPool
impl Clone for WorkerPool
source§fn clone(&self) -> WorkerPool
fn clone(&self) -> WorkerPool
Returns a copy 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 WorkerPool
impl Debug for WorkerPool
source§impl Default for WorkerPool
impl Default for WorkerPool
impl Copy for WorkerPool
Auto Trait Implementations§
impl Freeze for WorkerPool
impl RefUnwindSafe for WorkerPool
impl Send for WorkerPool
impl Sync for WorkerPool
impl Unpin for WorkerPool
impl UnwindSafe for WorkerPool
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)