ORIGINAL
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
original::async::sharedFuture< void > Class Referencefinal
Inheritance diagram for original::async::sharedFuture< void >:
Inheritance graph
Collaboration diagram for original::async::sharedFuture< void >:
Collaboration graph

Public Member Functions

 sharedFuture (const sharedFuture &)=default
 
sharedFutureoperator= (const sharedFuture &)=default
 
 sharedFuture (sharedFuture &&)=default
 
sharedFutureoperator= (sharedFuture &&)=default
 
bool valid () const noexcept override
 Checks if the shared future is valid (has an associated async wrapper)
 
void result () const
 Waits for completion and checks for exceptions.
 
bool ready () const override
 Checks if the computation is completed.
 
std::exception_ptr exception () const noexcept override
 Gets the exception if computation failed.
 
bool operator== (const sharedFuture &other) const noexcept
 Equality comparison operator.
 
bool operator!= (const sharedFuture &other) const noexcept
 Inequality comparison operator.
 
void wait () const override
 Waits until the computation completes.
 
bool waitFor (time::duration timeout) const override
 Waits for the result with a timeout.
 
u_integer toHash () const noexcept override
 Generates a hash value for the shared future.
 
bool equals (const sharedFuture &other) const noexcept override
 Checks if two shared futures are equal.
 
- Public Member Functions inherited from original::hashable< sharedFuture< void > >
virtual bool equals (const sharedFuture< void > &other) const noexcept
 Compares two objects for equality.
 
virtual ~hashable ()=0
 Virtual destructor.
 

Friends

class async
 

Member Function Documentation

◆ equals()

bool original::async::sharedFuture< void >::equals ( const sharedFuture< void > &  other) const
inlineoverridenoexcept

Checks if two shared futures are equal.

Parameters
otherThe other shared future to compare with
Returns
True if both shared futures refer to the same async wrapper

◆ exception()

std::exception_ptr original::async::sharedFuture< void >::exception ( ) const
inlineoverridevirtualnoexcept

Gets the exception if computation failed.

Returns
Exception pointer (nullptr if no exception)

Implements original::async::futureBase.

◆ operator!=()

bool original::async::sharedFuture< void >::operator!= ( const sharedFuture< void > &  other) const
inlinenoexcept

Inequality comparison operator.

Parameters
otherThe other shared future to compare with
Returns
True if shared futures refer to different async wrappers

◆ operator==()

bool original::async::sharedFuture< void >::operator== ( const sharedFuture< void > &  other) const
inlinenoexcept

Equality comparison operator.

Parameters
otherThe other shared future to compare with
Returns
True if both shared futures refer to the same async wrapper

◆ ready()

bool original::async::sharedFuture< void >::ready ( ) const
inlineoverridevirtual

Checks if the computation is completed.

Returns
True if completed

Implements original::async::futureBase.

◆ result()

void original::async::sharedFuture< void >::result ( ) const
inline

Waits for completion and checks for exceptions.

Exceptions
std::exceptionif the computation threw an exception

◆ toHash()

original::u_integer original::async::sharedFuture< void >::toHash ( ) const
inlineoverridevirtualnoexcept

Generates a hash value for the shared future.

Returns
Hash value based on the async wrapper pointer

Reimplemented from original::hashable< sharedFuture< void > >.

◆ valid()

bool original::async::sharedFuture< void >::valid ( ) const
inlineoverridevirtualnoexcept

Checks if the shared future is valid (has an associated async wrapper)

Returns
True if valid, false otherwise

Implements original::async::futureBase.

◆ wait()

void original::async::sharedFuture< void >::wait ( ) const
inlineoverridevirtual

Waits until the computation completes.

Implements original::async::futureBase.

◆ waitFor()

bool original::async::sharedFuture< void >::waitFor ( time::duration  timeout) const
inlineoverridevirtual

Waits for the result with a timeout.

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

Implements original::async::futureBase.


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