问题
Specifically I'm interested in using a DynamoDB table object from multiple threads (puts, gets, updates, etc). If that's not safe, then is there a safe way (i.e., maybe one table object per thread)? Any other gotchas or tips about working with threads in boto appreciated.
回答1:
The boto library uses httplib which has never been, and to my knowledge still is not, thread-safe. The workaround is to make sure each thread creates its own connection to DynamoDB and you should be good.
来源:https://stackoverflow.com/questions/19523680/is-boto-library-thread-safe