import time, threading
from django.core.files.base import ContentFile
from django.core.files.storage import FileSystemStorage
temp_storage = FileSystemStorage(location="/tmp/files")

class SlowFile(ContentFile):
    def chunks(self):
        print "Asked for chunks"
        time.sleep(2)
        print "Returning chunks"
        return super(ContentFile, self).chunks()

def save(data):
    temp_storage.save('conflict', SlowFile(data))

threading.Thread(target=save, args=("Content 1",)).start()
#time.sleep(5)
save("Content2")

