Specialization of asyncWrapper for void results.
More...
#include <async.h>
|
void | setValue () |
| Marks the computation as completed successfully.
|
|
void | setException (std::exception_ptr e) |
| Sets an exception and marks as completed.
|
|
bool | ready () const |
| Checks if the computation is completed.
|
|
void | wait () const |
| Waits until the computation completes.
|
|
bool | waitFor (time::duration timeout) const |
| Waits for the result with a timeout.
|
|
void | get () |
| Waits for completion and checks for exceptions.
|
|
void | peek () const |
| Checks for completion and exceptions without consuming the result.
|
|
void | rethrowIfException () const |
| Throws stored exception if present.
|
|
std::exception_ptr | exception () const noexcept |
| Gets the stored exception.
|
|
Specialization of asyncWrapper for void results.
◆ exception()
std::exception_ptr original::async::asyncWrapper< void >::exception |
( |
| ) |
const |
|
inlinenoexcept |
Gets the stored exception.
- Returns
- Exception pointer (nullptr if no exception)
◆ get()
void original::async::asyncWrapper< void >::get |
( |
| ) |
|
|
inline |
Waits for completion and checks for exceptions.
- Exceptions
-
std::exception | if the computation threw an exception |
◆ peek()
void original::async::asyncWrapper< void >::peek |
( |
| ) |
const |
|
inline |
Checks for completion and exceptions without consuming the result.
- Exceptions
-
std::exception | if the computation threw an exception |
◆ ready()
bool original::async::asyncWrapper< void >::ready |
( |
| ) |
const |
|
inline |
Checks if the computation is completed.
- Returns
- True if completed (successfully or with exception)
◆ rethrowIfException()
void original::async::asyncWrapper< void >::rethrowIfException |
( |
| ) |
const |
|
inline |
Throws stored exception if present.
- Exceptions
-
std::exception | if the computation threw an exception |
◆ setException()
void original::async::asyncWrapper< void >::setException |
( |
std::exception_ptr |
e | ) |
|
|
inline |
Sets an exception and marks as completed.
- Parameters
-
e | Exception pointer to store |
◆ waitFor()
bool original::async::asyncWrapper< void >::waitFor |
( |
time::duration |
timeout | ) |
const |
|
inline |
Waits for the result with a timeout.
- Parameters
-
timeout | Maximum time to wait |
- Returns
- True if result is ready within timeout, false otherwise
The documentation for this class was generated from the following file: