#include <future_fwd.hpp>
|
template<typename > |
class | ::qi::detail::FutureBaseTyped |
|
template<typename R > |
void | adaptFutureUnwrap (Future< AnyReference > &f, Promise< R > &p) |
| Feed a promise from a generic future which may be unwrapped if it contains itself a future. More...
|
|
template<typename FT , typename PT > |
void | adaptFuture (const Future< FT > &f, Promise< PT > &p, AdaptFutureOption option) |
| Feed a promise from a future of possibly different type. More...
|
|
template<typename FT , typename PT , typename CONV > |
void | adaptFuture (const Future< FT > &f, Promise< PT > &p, CONV converter, AdaptFutureOption option) |
| Similar to adaptFuture(f, p) but with a custom converter. More...
|
|
template<typename R > |
void | adaptFuture (Future< AnyReference > &f, Promise< R > &p) |
|
template<typename T>
class qi::Promise< T >
A Promise is used to create and satisfy a Future.
Definition at line 71 of file future_fwd.hpp.
Create a standard promise.
- Parameters
-
async | specify how callbacks registered with Future::connect are called: synchronously from the Promise setter, or asynchronously from a thread pool. |
Definition at line 810 of file future_fwd.hpp.
template<typename T>
template<typename FUNC , typename std::enable_if<!std::is_same< typename std::decay< FUNC >::type, typename std::decay< qi::Promise< T > >::type >::value >::type * = nullptr>
Get a future linked to this promise. Can be called multiple times.
Definition at line 881 of file future_fwd.hpp.
return true if cancel has been called on the promise (even if the cancel callback did not run yet).
Definition at line 876 of file future_fwd.hpp.
set the cancel state, and notify all futures throw if state != running
Definition at line 869 of file future_fwd.hpp.
template<typename T>
void qi::Promise< T >::setError |
( |
const std::string & |
msg | ) |
|
|
inline |
set the error, and notify all futures throw if state != running
Definition at line 862 of file future_fwd.hpp.
Set a cancel callback. If the cancel is requested, calls this callback immediately.
- Exceptions
-
std::exception | if the promise was not created as a cancelable promise. |
Definition at line 897 of file future_fwd.hpp.
notify all future that a value has been set. throw if state != running If T is void value
must be nullptr
Definition at line 855 of file future_fwd.hpp.
Trigger the promise with the current value.
Definition at line 890 of file future_fwd.hpp.
Gives access to the underlying value for in-place modification. trigger() must be called after the value is written to trigger the promise.
Definition at line 887 of file future_fwd.hpp.
template<typename T>
template<typename >
template<typename T>
template<typename FT , typename PT >
Feed a promise from a future of possibly different type.
Will monitor f
, and bounce its state to p
. Error and canceled state are bounced as is. Valued state is bounced through FutureValueConverter<FT, PT>::convert()
Definition at line 537 of file future.hxx.
template<typename T>
template<typename FT , typename PT , typename CONV >
Similar to adaptFuture(f, p) but with a custom converter.
Definition at line 547 of file future.hxx.
template<typename T>
template<typename R >
template<typename T>
template<typename R >
Feed a promise from a generic future which may be unwrapped if it contains itself a future.
Definition at line 528 of file future.hxx.
The documentation for this class was generated from the following file: