|
|
| future (const future &)=delete |
| |
|
future & | operator= (const future &)=delete |
| |
|
| future (future &&)=default |
| |
|
future & | operator= (future &&)=default |
| |
| bool | valid () const noexcept override |
| | Checks if the future is valid (has an associated async wrapper)
|
| |
| sharedFuture< TYPE > | share () |
| | Converts this future to a shared future.
|
| |
| TYPE | result () |
| | Gets the result (blocks until ready)
|
| |
| bool | ready () const override |
| | Checks if the result is ready.
|
| |
| std::exception_ptr | exception () const noexcept override |
| | Gets the exception if computation failed.
|
| |
| void | wait () const override |
| | Waits until the result becomes ready.
|
| |
| bool | waitFor (time::duration timeout) const override |
| | Waits for the result with a timeout.
|
| |
template<typename TYPE>
class original::async::future< TYPE >
Represents a one-shot future result of an asynchronous computation.
- Template Parameters
-
| TYPE | The result type of the computation |
future allows retrieving the result exactly once. After consumption, the value is moved out of storage.