#include <OnixS/FIXEngine/Threading/Future.h>
Definition at line 115 of file Future.h.
◆ anonymous enum
| Enumerator |
|---|
| InfiniteTimeout | -1 | |
Definition at line 156 of file Future.h.
◆ FutureBase() [1/5]
◆ FutureBase() [2/5]
◆ FutureBase() [3/5]
◆ FutureBase() [4/5]
Initializes the instance with shared state.
◆ FutureBase() [5/5]
Initializes the instance with shared state.
◆ ~FutureBase()
Destroys a future object.
If this is the last reference to the asynchronous result associated with *this (if any), then destroy that asynchronous result.
◆ getExceptionPtr()
Returns the stored exception.
- Exceptions
-
| The | std::logic_error if this instance does not refer to a shared state. |
| The | std::logic_error if the operation has not finished with an error. |
◆ getValue()
◆ getVoid()
◆ hasException()
Returns true if the asynchronous result associated with this Future has a stored exception, false otherwise.
- Exceptions
-
| The | std::logic_error if this instance does not refer to a shared state. |
◆ hasValue()
Returns true if the asynchronous result associated with this Future has a stored value, false otherwise.
- Exceptions
-
| The | std::logic_error if this instance does not refer to a shared state. |
◆ isReady()
Returns true if the asynchronous result associated with this Future is ready (has a value or an 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 the cache efficiency.
- Exceptions
-
| The | std::logic_error if this instance does not refer to a shared state. |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ swap()
◆ valid()
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 121 of file Future.h.
◆ wait()
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
-
| The | std::logic_error if this instance does not refer to a shared state. |
◆ FutureHelper
| friend class FutureHelper |
|
friend |
◆ PromiseBase