task::wait Method (C++ REST SDK)

Waits for this task to reach a terminal state. It is possible for wait to execute the task inline, if all of the tasks dependencies are satisfied, and it has not already been picked up for execution by a background worker.

task_status wait() const;

Return Value

A task_status value which could be either completed or canceled. If the task encountered an exception during execution, or an exception was propagated to it from an antecedent task, wait will throw that exception.

Requirements

Header: pplxtasks.h

Namespace: pplx

See Also

Reference

task Class