gpt4 book ai didi

c# - Azure DocumentClient 线程安全

转载 作者:太空狗 更新时间:2023-10-30 00:23:23 26 4
gpt4 key购买 nike

DocumentClient 线程安全吗?

我收到了混合消息:

来自 MSDN https://msdn.microsoft.com/library/azure/microsoft.azure.documents.client.documentclient.aspx :

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

来自微软博客https://azure.microsoft.com/en-us/blog/performance-tips-for-azure-documentdb-part-1-2/ :

SDK Usage Tip #1: Use a singleton DocumentDB client for the lifetime of your application Note that each DocumentClient instance is thread-safe and performs efficient connection management and address caching when operating in Direct Mode. To allow efficient connection management and better performance by DocumentClient, it is recommended to use a single instance of DocumentClient per AppDomain for the lifetime of the application.

最佳答案

抱歉造成困惑。我们已意识到此问题,我已将此问题报告给我们的文档团队。这是我们用来生成文档的文档工具中的一个错误。我会跟进他们的状态。

是的,DocumentClient 是线程安全的。

问候,拉杰什

关于c# - Azure DocumentClient 线程安全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39513803/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com