Is writting thread safe?
Hi, I would like to know if writing from different threads to the same open connection is safe? What happens if I keep calling write while it needs to flush?
What exactly do you mean by open connection?
So if I do something like:
with s3.open('mybucket/new-file', 'wb') as f:
And then call f.write() from multiple threads at the same time at a high rate would it be able to handle it?
I don't believe its ever been tested. Each upload of a block will happen in only one thread, but it is conceivable that the various attributes of the file instance have some race conditions.
It's not, files have been getting "chopped off" midway while I'm attempting to write many files at once.