Azure-cosmos-dotnet-v2: Are CloudTableClient and CloudTable thread-safe?

Created on 7 Nov 2018  路  4Comments  路  Source: Azure/azure-cosmos-dotnet-v2

Hi, would anyone please kindly let me know that whether Microsoft.Azure.CosmosDB.Table.CloudTableClient and Microsoft.Azure.CosmosDB.Table.CloudTable are thread-safe or not? The NuGet versions we are using is Microsoft.Azure.CosmosDB.Table 1.1.1 and Microsoft.Azure.DocumentDB 1.22.0. Thanks a lot.

question

Most helpful comment

@iRainbow5, yes CloudTableClient and CloudTable are thread safe. We recommend users reusing a single instance of CloudTableClient across the app.

All 4 comments

@iRainbow5 The DocumentClient is thread safe.

How about Microsoft.Azure.CosmosDB.Table.CloudTableClient and Microsoft.Azure.CosmosDB.Table.CloudTable? We are considering whether single instance of CloudTableClient and CloudTable can be shared across mult-threads.

@iRainbow5, yes CloudTableClient and CloudTable are thread safe. We recommend users reusing a single instance of CloudTableClient across the app.

Thanks! @wmengmsft

Was this page helpful?
0 / 5 - 0 ratings