是Azure的CloudTable线程安全的? [英] Is Azure CloudTable thread-safe?

查看:219
本文介绍了是Azure的CloudTable线程安全的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的存储SDK 2.0,从不同的线程(ASP.NET应用程序)写的Azure表存储。

I'm writing to Azure Table storage using Storage SDK 2.0 from different threads (ASP.NET application).

CloudTable 对象的线程安全?可以予初始化CloudStorageAccount,CloudTableClient和CloudTable只有一次(例如,在静态constuctor),然后使用它们在不同的线程?

Is CloudTable object thread-safe? Can I initialize CloudStorageAccount, CloudTableClient and CloudTable only once (for example, in static constuctor) and then use them in different threads?

或者是更好地创造一切CloudStorageAccount,CloudTableClient和CloudTable对象,每一次从空白(像它的显示在的这篇文章)?这是否会影响性能以任何方式?

Or is it better to create all CloudStorageAccount, CloudTableClient and CloudTable objects each time from a blank (like it's shown in this article)? Does it affect the performance in any way?

什么是越来越CloudTable的情况下执行的操作对表中的每个时间的prefered方式?

推荐答案

<一个href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.windowsazure.cloudstorageaccount.aspx">CloudStorageAccount

任何公共static(在Visual Basic中的Shared)这种类型的成员   线程安全的。所有实例成员都不能保证是线程   安全的。

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

<一个href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.windowsazure.storageclient.cloudtableclient.aspx">CloudTableClient

任何公共static(在Visual Basic中的Shared)这种类型的成员   线程安全的。所有实例成员都不能保证是线程   安全的。

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

这篇关于是Azure的CloudTable线程安全的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆