[][src]Trait std::task::Wake

pub trait Wake: Send + Sync {
    fn wake(arc_self: &Arc<Self>);

    unsafe fn wake_local(arc_self: &Arc<Self>) { ... }
}
🔬 This is a nightly-only experimental API. (futures_api #50547)

futures in libcore are unstable

A way of waking up a specific task.

Any task executor must provide a way of signaling that a task it owns is ready to be polled again. Executors do so by implementing this trait.

Required methods

fn wake(arc_self: &Arc<Self>)

🔬 This is a nightly-only experimental API. (futures_api #50547)

futures in libcore are unstable

Indicates that the associated task is ready to make progress and should be polled.

Executors generally maintain a queue of "ready" tasks; wake should place the associated task onto this queue.

Loading content...

Provided methods

unsafe fn wake_local(arc_self: &Arc<Self>)

🔬 This is a nightly-only experimental API. (futures_api #50547)

futures in libcore are unstable

Indicates that the associated task is ready to make progress and should be polled. This function is like wake, but can only be called from the thread on which this Wake was created.

Executors generally maintain a queue of "ready" tasks; wake_local should place the associated task onto this queue.

Loading content...

Implementors

Loading content...