![]() |
VR-Forces Developer's Guide
|
Awaitable result handle for an in-progress or completed command spec.
The HTTP thread receives a DtCommandSpecJobHandle via DtCommandSpecBuilder::buildCommandSpec(), then calls waitFor() to block until the spec is fully assembled.
A job that required no async data is returned already-complete so that waitFor() returns immediately.

Public Member Functions | |
| DtCommandSpecJob ()=default | |
| virtual | ~DtCommandSpecJob ()=default |
| DtCommandSpecJob (const DtCommandSpecJob &)=delete | |
| DtCommandSpecJob & | operator= (const DtCommandSpecJob &)=delete |
| bool | isComplete () const |
| bool | waitFor (std::chrono::milliseconds timeout) |
| Json::Value | result () const |
Protected Attributes | |
| std::mutex | myMutex |
| std::condition_variable | myCV |
| bool | myReady = false |
| Json::Value | myResult |
|
default |
|
virtualdefault |
|
delete |
|
delete |
| bool DtCommandSpecJob::isComplete | ( | ) | const |
Returns true if the job has been resolved via DtCommandSpecJobBuilder::complete().
| bool DtCommandSpecJob::waitFor | ( | std::chrono::milliseconds | timeout | ) |
Blocks the calling thread until the job completes or timeout elapses.
| Json::Value DtCommandSpecJob::result | ( | ) | const |
Returns the resolved command spec JSON object. Only valid after isComplete() returns true.
|
mutableprotected |
|
protected |
|
protected |
|
protected |