## System::Threading::Tasks::FromCanceled method


Creates a task that has completed due to cancellation with the specified token.

```cpp
TaskPtr System::Threading::Tasks::FromCanceled(const CancellationToken &cancellationToken)
```


| Parameter | Type | Description |
| --- | --- | --- |
| cancellationToken | const CancellationToken\& | The cancellation token that caused the task to be cancelled. |

### ReturnValue

A cancelled task.

## See Also

* Typedef [TaskPtr](../../system/taskptr/)
* Class [CancellationToken](../../system.threading/cancellationtoken/)
* Namespace [System::Threading::Tasks](../)
* Library [Aspose.TeX for C++](../../)
