pub struct LocalWaker { /* private fields */ }
🔬This is a nightly-only experimental API. (
local_waker
)Expand description
A LocalWaker
is analogous to a Waker
, but it does not implement Send
or Sync
.
This handle encapsulates a RawWaker
instance, which defines the
executor-specific wakeup behavior.
Local wakers can be requested from a Context
with the local_waker
method.
The typical life of a LocalWaker
is that it is constructed by an executor, wrapped in a
Context
using ContextBuilder
, then passed to Future::poll()
. Then, if the future chooses to return
Poll::Pending
, it must also store the waker somehow and call Loc