# DurableTaskReference&lt;TResult&gt;.IsCompletedAsync(PollingOptions, CancellationToken)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletaskreference-1/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletaskreference-1/methods/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/DurableTasks/DurableTaskReference.cs#L87)

```csharp
public Task<bool> IsCompletedAsync(PollingOptions options = default(PollingOptions), CancellationToken cancellationToken = default(CancellationToken))
```

Polls the task and returns whether it is terminal.

### Parameters

- `options` (`PollingOptions`): The options of the poll.
- `cancellationToken` (`CancellationToken`): A token which abandons the poll.

### Exceptions

- `Orleans.Durable.Tasks.DurableTaskNotFoundException`: The grain retains no task with this identifier.
