Open DethRaid opened 5 years ago
Please add futures and promises for easy returning of data from tasks.
Suggested interface:
template<typename ValType> class future { public: void on_success(std::function<void(ValType)>); void on_failure(std::function<void(ErrorType)>); bool is_ready(); void wait_until_ready(); ValType&& get_value(); };
Oh I'd probably be cool if the on_success or on_failure methods could return another future, so you'd have some way of chaining futures together
on_success
on_failure
Please add futures and promises for easy returning of data from tasks.
Suggested interface: