|
|
| promise (const promise &)=delete |
| |
|
promise & | operator= (const promise &)=delete |
| |
|
| promise (promise &&other) noexcept |
| |
|
promise & | operator= (promise &&other) noexcept |
| |
|
| promise ()=default |
| | Default constructor creates an invalid promise.
|
| |
| | promise (Callback &&c) |
| | Constructs a promise with a computation callback.
|
| |
| future< void > | getFuture () const |
| | Gets the future associated with this promise.
|
| |
| bool | valid () const noexcept |
| | Checks if the promise is still valid.
|
| |
| std::function< void()> | function () |
| | Extracts the computation function from the promise.
|
| |
| void | run () |
| | Executes the computation and marks completion in the associated future.
|
| |
template<typename Callback>
class original::async::promise< void, Callback >
Specialization of promise for void results.
- Template Parameters
-
| Callback | The type of the computation callback |
Same single-use semantics as the general promise template, but for void-returning computations.