Search code examples
rubyfog

Is Fog thread-safe?


As the title stated, I am writing a script to backup data from Rackspace to S3. So a more detailed question is whether fog-aws and fog-rackspace thread-safe or not.

PS: A more generic question, how can I test the thread safety of a block of code ?


Solution

  • I think you should be fine. I'm not sure that it has been extensively tested at this point, but the biggest potential problem is around how the connections/requests are made. These all occur with excon, which is thread-safe to the best of my knowledge, which would lead me to believe that by extension fog should work fine in this regard as well.