OpenPit C++ SDK
C++17 SDK for the OpenPit pre-trade risk engine
Loading...
Searching...
No Matches
openpit::asyncengine::Future< T > Class Template Reference

Consumer side of an async operation returning one value. More...

#include <future.hpp>

Public Member Functions

Await () const
template<typename Rep, typename Period>
std::optional< T > Await (std::chrono::duration< Rep, Period > timeout) const
bool Done () const
 Future ()=default
 Future (std::shared_future< Payload< T > > state)
Result< T > Get () const

Detailed Description

template<typename T>
class openpit::asyncengine::Future< T >

Consumer side of an async operation returning one value.

Constructor & Destructor Documentation

◆ Future() [1/2]

template<typename T>
openpit::asyncengine::Future< T >::Future ( )
default

◆ Future() [2/2]

template<typename T>
openpit::asyncengine::Future< T >::Future ( std::shared_future< Payload< T > > state)
inlineexplicit

Member Function Documentation

◆ Await() [1/2]

template<typename T>
T openpit::asyncengine::Future< T >::Await ( ) const
inlinenodiscard

◆ Await() [2/2]

template<typename T>
template<typename Rep, typename Period>
std::optional< T > openpit::asyncengine::Future< T >::Await ( std::chrono::duration< Rep, Period > timeout) const
inlinenodiscard

◆ Done()

template<typename T>
bool openpit::asyncengine::Future< T >::Done ( ) const
inlinenodiscard

◆ Get()

template<typename T>
Result< T > openpit::asyncengine::Future< T >::Get ( ) const
inlinenodiscard