我正在使用 Storage SDK 2.0 从不同线程(ASP.NET 应用程序)写入 Azure 表存储。
CloudTable对象线程安全吗?我可以仅初始化 CloudStorageAccount、CloudTableClient 和 CloudTable 一次(例如,在静态构造函数中),然后在不同的线程中使用它们吗?
或者每次都从空白创建所有 CloudStorageAccount、CloudTableClient 和 CloudTable 对象是否更好(如 this article 中所示)?它会以任何方式影响性能吗?
每次对表执行操作时获取 CloudTable 实例的首选方式是什么?
最佳答案
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
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/