## Task::Wait() method


Waits for the task to complete.

```cpp
void System::Threading::Tasks::Task::Wait()
```


## See Also

* Class [Task](../)
* Namespace [System::Threading::Tasks](../../)
* Library [Aspose.PDF for C++](../../../)
## Task::Wait(const CancellationToken\&) method


Waits for the task to complete with cancellation support.

```cpp
void System::Threading::Tasks::Task::Wait(const CancellationToken &cancellationToken)
```


| Parameter | Type | Description |
| --- | --- | --- |
| cancellationToken | const CancellationToken\& | Token to monitor for cancellation while waiting |

## See Also

* Class [CancellationToken](../../../system.threading/cancellationtoken/)
* Class [Task](../)
* Namespace [System::Threading::Tasks](../../)
* Library [Aspose.PDF for C++](../../../)
