Skip to main content

MpscIdleTaskQueue

Struct MpscIdleTaskQueue 

pub struct MpscIdleTaskQueue { /* private fields */ }
Expand description

默认空闲来源的唯一管理对象,Send+Sync,不可克隆(Clone)。

来源独立于普通外部任务队列(external task queue);释放即停收并接续全部剩余责任, 不等所有共享句柄释放。每步清理有限,用户析构(drop)本身不承诺固定耗时。

Implementations§

§

impl MpscIdleTaskQueue

pub fn new(options: MpscQueueOptions) -> Result<Self>

创建独立来源,复用默认64/3选项;不创建业务任务或轮询异步计算(Future)。

一次准备原生stub、取消检查终点和全量清理终点,三者分别配对释放。 显式节点分配失败保原报告(Report);标准共享分配遵守分配器失败策略。 逻辑数量上限usize::MAX >> 4;正常提交/旋转不增加每任务分配。

Trait Implementations§

§

impl Drop for MpscIdleTaskQueue

§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
§

impl IdleQueueManager for MpscIdleTaskQueue

§

fn clear(&mut self) -> Result<QueueCleanupProgress>

固定本次清理终点并有限推进;不停止并发新接收,重复调用继续原范围。

§

fn close(&mut self) -> Result<QueueCleanupProgress>

永久停收并接续全部旧责任;幂等,不以最后句柄释放或原Future析构确认为结束条件。

§

type Handle = MpscIdleTaskQueueHandle

同一来源的普通访问对象;克隆(Clone)不产生新来源或管理权限。
§

fn handle(&self) -> Self::Handle

取得同一原来源的受限共享访问,不重新开放已关闭来源。

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> OpaqueAttachment for T
where T: Send + Sync + 'static,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.