std1.0.0-beta-7 SafeC docs

std :: async::combinator

Struct std::Select2

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

generic<A: Future, B: Future, TA, TB> struct Select2 {
    A a;
    B b;
    int finished;
}

The first of two to be Ready wins; the other is dropped (tokio::select! with two branches, polled in order). Output: Either<TA, TB>.

Fields

§int finishedsource

Methods

§struct Poll<struct Either<TA, TB>> poll(&Context cx)source · definition
§void drop()source · definition