开发者

Is the Amazon .NET AWS SDK's AmazonS3 thread safe?

开发者 https://www.devze.com 2023-04-12 08:32 出处:网络
Is the Amazon .NET AWS SDK\'s AmazonS3 thread safe or should I be creating a new instance of AmazonS3 per request in a multi-threaded system?

Is the Amazon .NET AWS SDK's AmazonS3 thread safe or should I be creating a new instance of AmazonS3 per request in a multi-threaded system?

Specifically for the latest .NET AWS SDK (version 1.开发者_StackOverflow3.14).


I also asked this question on the Amazon AWS forum and an official AWS employee replied (Norm@AWS) with:

The .NET SDK is thread safe so keeping an instance of any of the clients like AmazonS3 around and reusing them is fine.

Norm

Link (Amazon .NET Development Forum - Is the .NET SDK's AmazonS3 thread safe?).


I create a new instance every thread and it works fine. I think it's safe per-call to be honest, including asynchronous calls.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号