low-level client + thread-safety question #3434
Replies: 2 comments
-
Hi @Gatsby-Lee thanks for reaching out. I think that those attributes you referenced should generally not be mutated in order to maintain consistent and expected responses from service APIs. And it's not considered thread-safe to do that because the AWS CLI doesn't have a mechanism for guaranteeing that the properties would stay the same through the entire request process across threads. The example provided here is the recommended way to do multi-threading: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/clients.html#general-example. |
Beta Was this translation helpful? Give feedback.
-
@tim-finnigan Hi, Thank you for your response. My question is that who wants to change these properties with what use cases? When do I want to touch those properties, especially "exceptions"? Thank you |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have a question about thread-safety in low-level client.
ref: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/clients.html#multithreading-or-multiprocessing-with-clients
I went through the link. ( I also read one in Resource and Session )
I don't understand this sentence.
What use case requires to change the value of the attributes, meta, exceptions and waiter_names?
And, why it's not thread-safe?
How can it be fully thread-safe? ( deep-copy of the response? )
Thank you
Gatsby
Beta Was this translation helpful? Give feedback.
All reactions