Honeycomb  0.1
Component-Model Framework
Public Member Functions | List of all members
honey::FutureCommon< Subclass, R > Class Template Reference

Mixin for common future methods. More...

#include <Future.h>

Public Member Functions

template<class Sched , class Func >
Future< typename std::result_of< Func(Subclass)>::type > then (Sched &&sched, Func &&f)
 Append a continuation function that will be called when this future is ready. The ready future is passed in (no wait on future.get()). More...
 
template<class Func >
Future< typename std::result_of< Func(Subclass)>::type > then (Func &&f)
 
template<class R2 = typename future::priv::wrappedResult<R>::type, typename std::enable_if< mt::True< R2 >::value &&std::is_base_of< FutureBase, R >::value, int >::type = 0>
Future< R2 > unwrap ()
 For wrapped futures Future<Future<R>>, returns a proxy Future<R> that will be ready when the inner future is ready. More...
 
template<class Sched , class Func >
auto then (Sched &&sched, Func &&f) -> Future< typename std::result_of< Func(Subclass)>::type >
 
template<class Func >
auto then (Func &&f) -> Future< typename std::result_of< Func(Subclass)>::type >
 

Detailed Description

template<class Subclass, class R>
class honey::FutureCommon< Subclass, R >

Mixin for common future methods.

Member Function Documentation

template<class Subclass, class R>
template<class Sched , class Func >
Future<typename std::result_of<Func(Subclass)>::type> honey::FutureCommon< Subclass, R >::then ( Sched &&  sched,
Func &&  f 
)

Append a continuation function that will be called when this future is ready. The ready future is passed in (no wait on future.get()).

template<class Subclass, class R>
template<class Func >
Future<typename std::result_of<Func(Subclass)>::type> honey::FutureCommon< Subclass, R >::then ( Func &&  f)
template<class Subclass, class R>
template<class Sched , class Func >
auto honey::FutureCommon< Subclass, R >::then ( Sched &&  sched,
Func &&  f 
) -> Future<typename std::result_of<Func(Subclass)>::type>
template<class Subclass, class R>
template<class Func >
auto honey::FutureCommon< Subclass, R >::then ( Func &&  f) -> Future<typename std::result_of<Func(Subclass)>::type>
template<class Subclass, class R>
template<class R2 = typename future::priv::wrappedResult<R>::type, typename std::enable_if< mt::True< R2 >::value &&std::is_base_of< FutureBase, R >::value, int >::type = 0>
Future<R2> honey::FutureCommon< Subclass, R >::unwrap ( )
inline

For wrapped futures Future<Future<R>>, returns a proxy Future<R> that will be ready when the inner future is ready.

If the wrapped future is shared (ie. Future<SharedFuture<R>>), the result will be copied, otherwise the result will be moved. If the outer or inner future throws an exception, the proxy future will throw it on get().


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