std1.0.0-beta-7 SafeC docs

std :: async::future

Trait std::Future

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

trait Future {
    void poll(&Context cx);
    void drop();
}

What a future is. The structural check is by name: a type with methods poll and drop fits, whatever its Output. Executors and combinators bound their future parameters with it, so a struct missing drop() is rejected where it is spawned or combined.

Required methods

§void poll(&Context cx)source
§void drop()source