Class CallbackSignalFuture
Defined in File callback_signal.hpp
Nested Relationships
Nested Types
Class Documentation
-
class CallbackSignalFuture
Handle returned by CallbackSignal::trigger_async().
The future can be queried for completion, waited on, and inspected for a captured exception. Calling wait() rethrows the first callback exception, if any, after all callbacks have finished.
Public Functions
-
void wait() const
Shared pointer aliases for CallbackSignalFuture.
Wait until the asynchronous trigger finishes.
If one or more callbacks threw an exception, the first captured exception is rethrown after all callbacks have completed.
-
bool is_completed() const
Check whether the asynchronous trigger has completed.
- Returns:
True if the trigger finished, false otherwise.
-
bool has_exception() const
Check whether the asynchronous trigger captured an exception.
- Returns:
True if a callback threw, false otherwise.
-
std::string get_exception_message() const
Get the stored exception message if one exists.
- Returns:
Exception text or an empty string when no exception was captured.
-
void wait() const