# DurableTaskReference&lt;TResult&gt;.GetResponseAsync(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#L94)

```csharp
public Task<DurableTaskResponse> GetResponseAsync(PollingOptions options, CancellationToken cancellationToken = default(CancellationToken))
```

Waits for the task's terminal response, polling with `options`.

### Parameters

- `options` (`PollingOptions`): The options of each poll.
- `cancellationToken` (`CancellationToken`): A token which abandons the wait. It doesn't cancel the task.

### Exceptions

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