# GrainCancellationTokenSource.Cancel

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.graincancellationtokensource/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.graincancellationtokensource/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Cancellation/GrainCancellationTokenSource.cs#L73)

```csharp
public Task Cancel()
```

Communicates a request for cancellation.

### Exceptions

- `System.AggregateException`: An aggregate exception containing all the exceptions thrown by the registered callbacks on the associated [GrainCancellationToken](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.graincancellationtoken/) .
- `System.ObjectDisposedException`: This [GrainCancellationTokenSource](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.graincancellationtokensource/) has been disposed.
