[−][src]Trait tract_nnef::internal::tract_downcast_rs::__std::task::Wake
wake_trait
)The implementation of waking a task on an executor.
This trait can be used to create a Waker
. An executor can define an
implementation of this trait, and use that to construct a Waker to pass
to the tasks that are executed on that executor.
This trait is a memory-safe and ergonomic alternative to constructing a
RawWaker
. It supports the common executor design in which the data used
to wake up a task is stored in an Arc
. Some executors (especially
those for embedded systems) cannot use this API, which is why RawWaker
exists as an alternative for those systems.
Required methods
Loading content...Provided methods
fn wake_by_ref(self: &Arc<Self>)
wake_trait
)Wake this task without consuming the waker.
If an executor supports a cheaper way to wake without consuming the
waker, it should override this method. By default, it clones the
Arc
and calls wake
on the clone.