Simulant  21.12-574
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | Static Public Member Functions | Friends | List of all members
smlt::Promise< T > Class Template Reference

Public Member Functions

bool is_ready () const
 
bool fulfill (T &&value)
 fulfill More...
 
T & value () const
 
template<typename Func >
auto then (Func &&func) -> Promise< typename promise_impl::func_traits< typename std::decay< Func >::type >::result_type >
 
bool is_initialized () const
 

Static Public Member Functions

static Promise< T > create ()
 

Friends

template<typename Func >
Promise< typename std::result_of< Func()>::type > cr_async (Func func)
 

Member Function Documentation

◆ fulfill()

template<typename T >
bool smlt::Promise< T >::fulfill ( T &&  value)
inline

fulfill

Parameters
value
Returns
returns true if the promise is successfully fulfilled, or false if it was already filfulled or could not be.

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