Struct ExecutorOptions
pub struct ExecutorOptions {
pub maintenance_batch: NonZero<usize>,
pub would_block_retries: u8,
pub timer_delivery: TimerDelivery,
pub max_sleep: Duration,
}Expand description
默认执行器(executor)的固定工作配置;不改变运行时(runtime)接纳语义。
Fields§
§maintenance_batch: NonZero<usize>回送转入本地、注册维护的每步节点上限,默认64,不限制外部当前有限批次。
would_block_retries: u8原生WouldBlock后的额外立即尝试次数,允许0至2,默认2;Busy不立即重试。
timer_delivery: TimerDelivery到期交付方式,默认All;One直接选择至多一份,All保持来源顺序转入内部队首。
max_sleep: Duration线程被动重查上限,允许1ms至10ms,默认10ms;到期更近时可以更短。
Implementations§
Trait Implementations§
Source§impl Clone for ExecutorOptions
impl Clone for ExecutorOptions
Source§fn clone(&self) -> ExecutorOptions
fn clone(&self) -> ExecutorOptions
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 moreimpl Copy for ExecutorOptions
Source§impl Debug for ExecutorOptions
impl Debug for ExecutorOptions
Source§impl Default for ExecutorOptions
impl Default for ExecutorOptions
Source§fn default() -> ExecutorOptions
fn default() -> ExecutorOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Forget for ExecutorOptions
impl Freeze for ExecutorOptions
impl Move for ExecutorOptions
impl RefUnwindSafe for ExecutorOptions
impl Send for ExecutorOptions
impl Sync for ExecutorOptions
impl Unpin for ExecutorOptions
impl UnsafeUnpin for ExecutorOptions
impl UnwindSafe for ExecutorOptions
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