Values that will be eventually available.
More...
#include <future.h>
|
using | promise_type = Basic_promise< Alloc, Ts... > |
|
using | storage_type = detail::Future_storage< Alloc, Ts... > |
| The underlying storage type.
|
|
using | allocator_type = Alloc |
| Allocator.
|
|
using | value_type = detail::future_value_type_t< Ts... > |
| Ts...
|
|
using | fullfill_type = detail::fullfill_type_t< Ts... > |
|
using | finish_type = detail::finish_type_t< Ts... > |
|
|
| Basic_future ()=default |
| Construct an uninitialized Future. More...
|
|
| Basic_future (Basic_future &&rhs)=default |
| Move constructor. More...
|
|
Basic_future & | operator= (Basic_future &&rhs)=default |
| Move assignment. More...
|
|
template<typename CbT > |
auto | then (CbT &&callback) |
| Creates a future that is finished by the invocation of cb when this is fullfilled. More...
|
|
template<typename QueueT , typename CbT > |
auto | then (QueueT &queue, CbT &&callback) |
| Creates a future that is finished by the invocation of cb when this is finished. More...
|
|
template<typename CbT > |
auto | then_expect (CbT &&callback) |
| Creates a future that is finished by the invocation of cb when this is finished. More...
|
|
template<typename QueueT , typename CbT > |
auto | then_expect (QueueT &queue, CbT &&callback) |
| Creates a future that is finished by the invocation of cb from queue when this is finished. More...
|
|
template<typename CbT > |
void | finally (CbT &&callback) |
| Invokes cb when this is finished. More...
|
|
template<typename QueueT , typename CbT > |
void | finally (QueueT &queue, CbT &&callback) |
| Invokes cb from queue when this is finished. More...
|
|
value_type | get () |
| Blocks until the future is finished, and then either return the value, or throw the error. More...
|
|
auto | std_future () |
| Obtain a std::future bound to this future. More...
|
|
allocator_type & | allocator () |
| Get the allocator associated with this future. More...
|
|
| Basic_future (detail::Storage_ptr< storage_type > s) |
| Create a future directly from its underlying storage.
|
|
template<typename Alloc, typename... Ts>
class aom::Basic_future< Alloc, Ts >
Values that will be eventually available.
- Template Parameters
-
Ts | fields set to void have special rules applied to them. The following types may not be used:
expected<T>
Future<Ts...>
Promise<T>
|
- Invariant
- A Future is in one of two states:
- Uninitialized: The only legal operation is to assign another future to it.
- Ready: All operations are legal.
◆ Basic_future() [1/2]
template<typename Alloc, typename... Ts>
Construct an uninitialized Future.
- Postcondition
this
will be uninitialized
◆ Basic_future() [2/2]
template<typename Alloc, typename... Ts>
Move constructor.
- Parameters
-
- Postcondition
rhs
will be uninitialized
◆ allocator()
template<typename Alloc, typename... Ts>
Get the allocator associated with this future.
- Precondition
- The future must have shared storage associated with it.
- Returns
- Alloc&
◆ finally() [1/2]
template<typename Alloc, typename... Ts>
template<typename CbT >
Invokes cb when this is finished.
- Template Parameters
-
- Parameters
-
- Precondition
- the future must be ready
- Postcondition
- the future will be uninitialized
◆ finally() [2/2]
template<typename Alloc, typename... Ts>
template<typename QueueT , typename CbT >
Invokes cb from queue when this is finished.
- Template Parameters
-
- Parameters
-
- Precondition
- the future must be ready
- Postcondition
- the future will be uninitialized
◆ get()
template<typename Alloc, typename... Ts>
Blocks until the future is finished, and then either return the value, or throw the error.
- Returns
- auto
- Precondition
- the future must be ready
- Postcondition
- the future will be uninitialized
◆ operator=()
template<typename Alloc, typename... Ts>
Move assignment.
- Parameters
-
- Returns
- Future&
- Postcondition
rhs
will be uninitialized
◆ std_future()
template<typename Alloc, typename... Ts>
Obtain a std::future bound to this future.
- Returns
- auto
◆ then() [1/2]
template<typename Alloc, typename... Ts>
template<typename CbT >
Creates a future that is finished by the invocation of cb when this is fullfilled.
- Template Parameters
-
- Parameters
-
- Returns
- Future<decltype(callback(Ts...))> a \ready Future
- Precondition
- the future must be ready
- Postcondition
- the future will be uninitialized
◆ then() [2/2]
template<typename Alloc, typename... Ts>
template<typename QueueT , typename CbT >
Creates a future that is finished by the invocation of cb when this is finished.
- Template Parameters
-
- Parameters
-
- Returns
- auto
- Precondition
- the future must be ready
- Postcondition
- the future will be uninitialized
◆ then_expect() [1/2]
template<typename Alloc, typename... Ts>
template<typename CbT >
Creates a future that is finished by the invocation of cb when this is finished.
- Template Parameters
-
- Parameters
-
- Returns
- auto
- Precondition
- the future must be ready
- Postcondition
- the future will be uninitialized
◆ then_expect() [2/2]
template<typename Alloc, typename... Ts>
template<typename QueueT , typename CbT >
Creates a future that is finished by the invocation of cb from queue when this is finished.
- Template Parameters
-
- Parameters
-
- Returns
- auto
- Precondition
- the future must be ready
- Postcondition
- the future will be uninitialized
The documentation for this class was generated from the following file: