std1.0.0-beta-7 SafeC docs

std :: async::future

Struct std::WakerSlot

#include <std/async/future.h> source

struct WakerSlot {
    struct Waker w;
    int set;
}

One registered waker (Rust's AtomicWaker): where a single waiting future leaves its waker for whoever completes it. Not locked by itself; the structure that holds it (a channel, a task) guards it.

Fields

§struct Waker wsource
§int setsource

Methods

§static struct WakerSlot new()source · definition
§int wake()source · definition

Wake and release the held waker. Returns 1 if there was one.

§void clear()source · definition

Release it without waking.

§void drop()source · definition

clear(): a slot owns the waker it holds