ORIGINAL
Loading...
Searching...
No Matches
Public Member Functions | List of all members
original::async::asyncWrapper< void > Class Reference

Specialization of asyncWrapper for void results. More...

#include <async.h>

Collaboration diagram for original::async::asyncWrapper< void >:
Collaboration graph

Public Member Functions

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 (const 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.
 

Detailed Description

Specialization of asyncWrapper for void results.

Member Function Documentation

◆ 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::exceptionif 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::exceptionif 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::exceptionif 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
eException pointer to store

◆ waitFor()

bool original::async::asyncWrapper< void >::waitFor ( const time::duration timeout) const
inline

Waits for the result with a timeout.

Parameters
timeoutMaximum time to wait
Returns
True if result is ready within timeout, false otherwise

The documentation for this class was generated from the following file: