#include <OnixS/CboeCFE/Trading/BOE/Threading/Future.h>
Definition at line 59 of file Future.h.
Enumerator |
---|
InfiniteTimeout |
|
Definition at line 94 of file Future.h.
ONIXS_CBOE_CFE_BOE_API FutureBase |
( |
const System::FutureSharedState * |
state | ) |
|
|
protected |
Initializes the instance with shared state.
Initializes the instance with shared state.
Destroys a future object.
If this is the last reference to the asynchronous result associated with *this (if any), then destroy that asynchronous result.
ONIXS_CBOE_CFE_BOE_API const void* getValuePtr |
( |
| ) |
const |
|
protected |
ONIXS_CBOE_CFE_BOE_API void getVoid |
( |
| ) |
const |
|
protected |
ONIXS_CBOE_CFE_BOE_API bool has_exception |
( |
| ) |
const |
Returns true
if the asynchronous result associated with this Future has a stored exception, false
otherwise.
- Exceptions
-
std::logic_error | if this instance does not refer to a shared state. |
ONIXS_CBOE_CFE_BOE_API bool has_value |
( |
| ) |
const |
Returns true
if the asynchronous result associated with this Future has a stored value, false
otherwise.
- Exceptions
-
std::logic_error | if this instance does not refer to a shared state. |
ONIXS_CBOE_CFE_BOE_API bool is_ready |
( |
| ) |
const |
Returns true
if the asynchronous result associated with this Future is ready (has a value or exception stored in the shared state), false
otherwise.
There are often situations where a get()
call on a Future may not be a blocking call, or is only a blocking call under certain circumstances. This method gives the ability to test for early completion and allows us to avoid associating a continuation, which needs to be scheduled with some non-trivial overhead and near-certain loss of cache efficiency.
- Exceptions
-
std::logic_error | if this instance does not refer to a shared state. |
ONIXS_CBOE_CFE_BOE_API void swap |
( |
FutureBase & |
other | ) |
|
|
protected |
Check if a future instance is associated with an asynchronous result.
Returns true
if the *this has an associated asynchronous result, false otherwise.
Definition at line 65 of file Future.h.
Waits for the result to become available during the timeout.
- Note
- Calling
wait
on the same Future from multiple threads is not safe; the intended use is for each thread that waits on the same shared state to have a copy of a Future.
- Exceptions
-
std::logic_error | if this instance does not refer to a shared state. |
friend class FutureHelper |
|
friend |
The documentation for this class was generated from the following file:
- include/OnixS/CboeCFE/Trading/BOE/Threading/Future.h