Function waker_generic::new_waker
source · pub fn new_waker<W>(wake_action: W) -> (Waker, Blocker)where
W: Fn() + Send + Sync + 'static,
Expand description
Creates a new waker and blocker pair that are associated with each other.
Arguments
wake_action
: the action that will be taken by the waker when it is ready to wake up the blocker, i.e., allow it to stop blocking.
The blocker can be used to block a task until the waker is woken.