ORIGINAL
Loading...
Searching...
No Matches
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 ()
 Waits until the computation completes.
 
void get ()
 Waits for completion and checks for exceptions.
 
void rethrowIfException () const
 Throws stored exception if present.
 
std::exception_ptr exception () const noexcept
 Gets the stored exception.
 
bool available () const
 Checks if the computation completed successfully.
 

Detailed Description

Specialization of asyncWrapper for void results.

Member Function Documentation

◆ available()

bool original::async::asyncWrapper< void >::available ( ) const
inlinenodiscard

Checks if the computation completed successfully.

Returns
True if completed without exception

◆ exception()

std::exception_ptr original::async::asyncWrapper< void >::exception ( ) const
inlinenodiscardnoexcept

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

◆ ready()

bool original::async::asyncWrapper< void >::ready ( ) const
inlinenodiscard

Checks if the computation is completed.

Returns
True if completed (successfully or with 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

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