Skip to main content

TaskCancelWait

Struct TaskCancelWait 

Source
pub struct TaskCancelWait<N: TaskNotifier> { /* private fields */ }
Expand description

一份取消等待;额外探针只为通知核原生取消事实,不形成定时登记持有环。 首次轮询(poll)才推进原生取消等待,返回原CancellationOutcome,不把请求记录当作析构成功。 受管任务(Task)内以实际当前任务身份为准;首次挂起(Pending)后不得更换实际等待者身份,这不禁止保持身份的跨线程移动。 释放(drop)撤销本份等待登记,不撤销已记录的取消;构造和重复挂起不额外重复通知。

Trait Implementations§

Source§

impl<N: TaskNotifier> Future for TaskCancelWait<N>

Source§

type Output = CancellationOutcome

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
Source§

impl<N: TaskNotifier> Unpin for TaskCancelWait<N>

Auto Trait Implementations§

§

impl<N> !RefUnwindSafe for TaskCancelWait<N>

§

impl<N> !UnwindSafe for TaskCancelWait<N>

§

impl<N> Forget for TaskCancelWait<N>

§

impl<N> Freeze for TaskCancelWait<N>
where N: Freeze,

§

impl<N> Move for TaskCancelWait<N>

§

impl<N> Send for TaskCancelWait<N>

§

impl<N> Sync for TaskCancelWait<N>

§

impl<N> UnsafeUnpin for TaskCancelWait<N>
where N: UnsafeUnpin,

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<F> IntoFuture for F
where F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
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.