Reputation: 373
Is there any proper way of canceling a running task against CosmosDb?
I'm calling my API that uses CancellationToken, when receiving data from the DocumentClient there does not seem to be a way of utilizing the tokens in a proper way.
Upvotes: 1
Views: 72
Reputation: 7200
Versions before 2.0.0 for Microsoft.Azure.DocumentDB.Core
don't have support for CancellationToken
on the ReadDocumentAsync
.
However Microsoft.Azure.DocumentDB.Core 2.0.0 just got released and it does have support for CancellationToken
for all it's CRUD operations.
Upvotes: 1