userver: engine::Promise< void > Class Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
engine::Promise< void > Class Referencefinal

Your opinion will help to improve our service

Leave a feedback >

Detailed Description

Definition at line 162 of file future.hpp.

Public Member Functions

 Promise ()
 Creates a new asynchronous signal store.
 
 Promise (const Promise &)=delete
 
 Promise (Promise &&) noexcept=default
 
Promiseoperator= (const Promise &)=delete
 
Promiseoperator= (Promise &&) noexcept
 
Future< void > get_future ()
 
void set_value ()
 
void set_exception (std::exception_ptr ex)
 
 Promise ()
 Creates a new asynchronous value store.
 
 Promise (const Promise &)=delete
 
 Promise (Promise &&) noexcept=default
 
Promiseoperator= (const Promise &)=delete
 
Promiseoperator= (Promise &&) noexcept
 
Future< void > get_future ()
 
void set_value (const void &)
 
void set_value (void &&)
 
void set_exception (std::exception_ptr ex)
 

Constructor & Destructor Documentation

◆ Promise() [1/2]

engine::Promise< void >::Promise ( )
inline

Creates a new asynchronous signal store.

Definition at line 286 of file future.hpp.

◆ ~Promise() [1/2]

engine::Promise< void >::~Promise ( )
inline

Definition at line 295 of file future.hpp.

◆ Promise() [2/2]

engine::Promise< void >::Promise ( )

Creates a new asynchronous value store.

Definition at line 132 of file future.hpp.

◆ ~Promise() [2/2]

engine::Promise< void >::~Promise ( )

Definition at line 134 of file future.hpp.

Member Function Documentation

◆ get_future() [1/2]

Future< void > engine::Promise< void >::get_future ( )
nodiscard

Retrieves the Future associated with this value store.

Exceptions
std::future_errorif the Future has already been retrieved.

Definition at line 143 of file future.hpp.

◆ get_future() [2/2]

Future< void > engine::Promise< void >::get_future ( )
inlinenodiscard

Retrieves the Future associated with this signal store.

Exceptions
std::future_errorif the Future has already been retrieved.

Definition at line 305 of file future.hpp.

◆ operator=()

Promise< void > & engine::Promise< void >::operator= ( Promise< void > && other)
noexcept

Definition at line 139 of file future.hpp.

◆ set_exception() [1/2]

void engine::Promise< void >::set_exception ( std::exception_ptr ex)

Stores an exception to be thrown on retrieval.

Exceptions
std::future_errorif a value or an exception has already been set.

Definition at line 155 of file future.hpp.

◆ set_exception() [2/2]

void engine::Promise< void >::set_exception ( std::exception_ptr ex)
inline

Stores an exception to be thrown on retrieval.

Exceptions
std::future_errorif a signal or an exception has already been set.

Definition at line 309 of file future.hpp.

◆ set_value() [1/3]

void engine::Promise< void >::set_value ( )
inline

Stores a signal for retrieval.

Exceptions
std::future_errorif a signal or an exception has already been set.

Definition at line 307 of file future.hpp.

◆ set_value() [2/3]

void engine::Promise< void >::set_value ( const void & value)

Stores a value for retrieval.

Exceptions
std::future_errorif a value or an exception has already been set.

Definition at line 147 of file future.hpp.

◆ set_value() [3/3]

void engine::Promise< void >::set_value ( void && value)

Stores a value for retrieval.

Exceptions
std::future_errorif a value or an exception has already been set.

Definition at line 151 of file future.hpp.


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