dispenso
A library for task parallelism
 
Loading...
Searching...
No Matches
dispenso::Future< Result & > Class Template Reference

Inherits dispenso::detail::FutureBase< Result & >.

Public Member Functions

 Future (Future &&f) noexcept
 
 Future (Base &&f) noexcept
 
 Future (const Future &f) noexcept
 
 Future (const Base &f) noexcept
 
template<typename F , typename Schedulable >
 Future (F &&f, Schedulable &schedulable, std::launch asyncPolicy=kNotAsync, std::launch deferredPolicy=std::launch::deferred)
 
Futureoperator= (Future &&f) noexcept
 
Futureoperator= (const Future &f)
 
Future share ()
 
Resultget () const
 
template<typename F , typename Schedulable >
Future< detail::ResultOf< F, Future< Result & > && > > then (F &&f, Schedulable &sched, std::launch asyncPolicy=kNotAsync, std::launch deferredPolicy=std::launch::deferred)
 
template<typename F >
Future< detail::ResultOf< F, Future< Result & > && > > then (F &&f)
 

Friends

template<typename X >
Future< X & > make_ready_future (std::reference_wrapper< X > x)
 

Detailed Description

template<typename Result>
class dispenso::Future< Result & >

Definition at line 268 of file future.h.

Constructor & Destructor Documentation

◆ Future() [1/6]

template<typename Result >
dispenso::Future< Result & >::Future ( )
inlinenoexcept

Definition at line 272 of file future.h.

◆ Future() [2/6]

template<typename Result >
dispenso::Future< Result & >::Future ( Future< Result & > &&  f)
inlinenoexcept

Definition at line 273 of file future.h.

◆ Future() [3/6]

template<typename Result >
dispenso::Future< Result & >::Future ( Base &&  f)
inlinenoexcept

Definition at line 274 of file future.h.

◆ Future() [4/6]

template<typename Result >
dispenso::Future< Result & >::Future ( const Future< Result & > &  f)
inlinenoexcept

Definition at line 275 of file future.h.

◆ Future() [5/6]

template<typename Result >
dispenso::Future< Result & >::Future ( const Base &  f)
inlinenoexcept

Definition at line 276 of file future.h.

◆ Future() [6/6]

template<typename Result >
dispenso::Future< Result & >::Future ( F &&  f,
Schedulable schedulable,
std::launch  asyncPolicy = kNotAsync,
std::launch  deferredPolicy = std::launch::deferred 
)
inline

Definition at line 278 of file future.h.

Member Function Documentation

◆ get()

template<typename Result >
Result & dispenso::Future< Result & >::get ( ) const
inline

Get the result of the future functor. This function blocks until the result is ready.

Returns
Access to the underlying reference.

Definition at line 308 of file future.h.

◆ operator=() [1/2]

template<typename Result >
Future & dispenso::Future< Result & >::operator= ( const Future< Result & > &  f)
inline

Definition at line 288 of file future.h.

◆ operator=() [2/2]

template<typename Result >
Future & dispenso::Future< Result & >::operator= ( Future< Result & > &&  f)
inlinenoexcept

Definition at line 284 of file future.h.

◆ share()

template<typename Result >
Future dispenso::Future< Result & >::share ( )
inline

Definition at line 299 of file future.h.

◆ then() [1/2]

template<typename Result >
template<typename F >
Future< detail::ResultOf< F, Future< Result & > && > > dispenso::Future< Result & >::then ( F &&  f)
inline

Definition at line 325 of file future.h.

◆ then() [2/2]

template<typename Result >
Future< detail::ResultOf< F, Future< Result & > && > > dispenso::Future< Result & >::then ( F &&  f,
Schedulable sched,
std::launch  asyncPolicy = kNotAsync,
std::launch  deferredPolicy = std::launch::deferred 
)
inline

Definition at line 314 of file future.h.

Friends And Related Symbol Documentation

◆ Future

template<typename Result >
template<typename R >
friend class Future
friend

Definition at line 339 of file future.h.

◆ make_ready_future

template<typename Result >
template<typename X >
Future< X & > make_ready_future ( std::reference_wrapper< X x)
friend

Make a Future in a ready state with the reference_wrapper passed into make_ready_future

Parameters
xthe wrapped reference to use to create the returned future.

Definition at line 587 of file future.h.


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