SimGrid  3.16
Versatile Simulation of Distributed Systems
simgrid::kernel::FutureState< T > Class Template Reference

Detailed Description

template<class T>
class simgrid::kernel::FutureState< T >

Shared state for future and promises.

You are not expected to use them directly but to create them implicitely through a simgrid::kernel::Promise. Alternatively kernel operations could inherit or contain FutureState if they are managed with std::shared_ptr.

#include <future.hpp>

Inheritance diagram for simgrid::kernel::FutureState< T >:
simgrid::kernel::FutureStateBase

Public Member Functions

void set_value (T value)
 
get ()
 
- Public Member Functions inherited from simgrid::kernel::FutureStateBase
 FutureStateBase (FutureStateBase const &)=delete
 
FutureStateBaseoperator= (FutureStateBase const &)=delete
 
void schedule (simgrid::xbt::Task< void()> &&job)
 
void set_exception (std::exception_ptr exception)
 
void set_continuation (simgrid::xbt::Task< void()> &&continuation)
 
FutureStatus get_status () const
 
bool is_ready () const
 

Additional Inherited Members

- Protected Member Functions inherited from simgrid::kernel::FutureStateBase
 FutureStateBase ()=default
 
 ~FutureStateBase ()=default
 
void set_ready ()
 Set the future as ready and trigger the continuation. More...
 
void resolve ()
 Set the future as done and raise an exception if any. More...
 

Member Function Documentation

◆ set_value()

template<class T >
void simgrid::kernel::FutureState< T >::set_value ( value)
inline

◆ get()

template<class T >
T simgrid::kernel::FutureState< T >::get ( )
inline

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