|
ORIGINAL
|
Specialization of promise for void results. More...
#include <async.h>

Public Member Functions | |
| 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. | |
Specialization of promise for void results.
| Callback | The type of the computation callback |
Same single-use semantics as the general promise template, but for void-returning computations.
|
explicit |
Constructs a promise with a computation callback.
| c | Callback that will execute the computation |
| std::function< void()> original::async::promise< void, Callback >::function | ( | ) |
Extracts the computation function from the promise.
| sysError | if the promise is invalid |
| original::async::future< void > original::async::promise< void, Callback >::getFuture | ( | ) | const |
Gets the future associated with this promise.
Executes the computation and marks completion in the associated future.
| sysError | if the promise is invalid |
| Any | exception thrown by the computation function |
|
noexcept |
Checks if the promise is still valid.