Boto3客户端线程安全吗 [英] Is boto3 client thread-safe

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

问题描述

boto3低级客户端对S3线程安全吗?文档尚不明确.

Is boto3 low level client for S3 thread-safe? Documentation is not explicit about it.

https://boto3.amazonaws. com/v1/documentation/api/latest/reference/services/s3.html#client

在Github中讨论了类似的问题

A similar issue is discussed in Github

https://github.com/boto/botocore/issues/1246

但是维护者仍然没有答案.

But still there is no answer from maintainers.

推荐答案

如果您查看

If you take a look at the Multithreading/Processing documentation for boto3 you can see that they recommend one client per session as there is shared data between instance that can be mutated by individual threads.

对于这个确切的问题,似乎还有一个开放的github问题. https://github.com/boto/botocore/issues/1246

It also looks like there's an open github issue for this exact question. https://github.com/boto/botocore/issues/1246

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

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