.net - Azure CloudTable 线程安全吗?

标签 .net azure azure-storage azure-table-storage

我正在使用 Storage SDK 2.0 从不同线程(ASP.NET 应用程序)写入 Azure 表存储。

CloudTable对象线程安全吗?我可以仅初始化 CloudStorageAccount、CloudTableClient 和 CloudTable 一次(例如,在静态构造函数中),然后在不同的线程中使用它们吗?

或者每次都从空白创建所有 CloudStorageAccount、CloudTableClient 和 CloudTable 对象是否更好(如 this article 中所示)?它会以任何方式影响性能吗?

每次对表执行操作时获取 CloudTable 实例的首选方式是什么?

最佳答案

CloudStorageAccount

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

CloudTableClient

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

关于.net - Azure CloudTable 线程安全吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13246720/

相关文章:

.net - Windows 托管的 WCF 服务可以使用 HTTPS 吗?

azure - 什么是 Azure guest 操作系统?

azure - 将应用程序的新版本部署到当前运行的 Azure 应用服务实例有何影响?

azure - 应用服务的 Azure 磁盘空间仅用于与运行应用程序相关的文件,还是也可以存储用户上传的文件?

azure - 需要哪些权限才能使 Azure 存储分析日志不可变?

c# - 除了使用 P/Invoke 之外,如何在 hBitmap 上调用 DeleteObject()?

.net - 即时修改 IL 代码

c# - TcpClient 已连接但服务器未收到消息

azure - 从azure(itfoxtec)实现多个公司登录

azure - Windows Azure 表 : C# API for Update/Merge?