Specialization of Future for void results. More...
#include <future.h>
Public Member Functions | |
| Future ()=default | |
| Constructs an invalid (empty) Future. | |
| Future (std::future< void > &&f) | |
| Constructs a Future from a std::future. | |
| ~Future ()=default | |
| Destructor. | |
| Future (const Future &)=delete | |
| Future & | operator= (const Future &)=delete |
| Future (Future &&other)=default | |
| Future & | operator= (Future &&other)=default |
| bool | isReady () const |
| Checks whether the result is ready without blocking. | |
| Error | result (unsigned int timeoutMs=0) |
| Waits for completion and returns the status. | |
| void | waitForFinished () |
| Blocks until the result is ready. | |
| Error | waitForFinished (unsigned int timeoutMs) |
| Blocks until the result is ready or the timeout expires. | |
| bool | isValid () const |
| Returns whether this Future holds a valid shared state. | |
Specialization of Future for void results.
Provides the same interface but result() returns just an Error.
Checks whether the result is ready without blocking.
Returns whether this Future holds a valid shared state.
Waits for completion and returns the status.
| timeoutMs | Maximum time to wait in milliseconds. A value of 0 (the default) waits indefinitely. |
Blocks until the result is ready or the timeout expires.
| timeoutMs | Maximum time to wait in milliseconds. |