pub struct BlockingPoolOpts {
pub max_threads: Option<usize>,
pub thread_keep_alive: Option<Duration>,
}Expand description
Configuration options for the blocking thread pool used by the runtime.
These options control the behavior of the blocking thread pool that handles
tokio::task::spawn_blocking tasks.
Fields§
§max_threads: Option<usize>The maximum number of threads in the blocking thread pool.
When not set, the tokio default (512) is used.
thread_keep_alive: Option<Duration>The duration that idle blocking threads are kept alive before being shut down.
When not set, the tokio default (10 seconds) is used.
Trait Implementations§
Source§impl Clone for BlockingPoolOpts
impl Clone for BlockingPoolOpts
Source§fn clone(&self) -> BlockingPoolOpts
fn clone(&self) -> BlockingPoolOpts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BlockingPoolOpts
impl Debug for BlockingPoolOpts
Source§impl Default for BlockingPoolOpts
impl Default for BlockingPoolOpts
Source§fn default() -> BlockingPoolOpts
fn default() -> BlockingPoolOpts
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BlockingPoolOpts
impl RefUnwindSafe for BlockingPoolOpts
impl Send for BlockingPoolOpts
impl Sync for BlockingPoolOpts
impl Unpin for BlockingPoolOpts
impl UnsafeUnpin for BlockingPoolOpts
impl UnwindSafe for BlockingPoolOpts
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