for i in range(NUMBER_OF_PROCESSES):
    multiprocessing.Process(target=uploader, args=(filenames,)).start()
filenames.put('some filename')
for i in range(NUMBER_OF_PROCESSES):
    filenames.put('STOP')
if __name__ == '__main__':
    multiprocessing.freeze_support()
main()
How do I upload many files at the time to cloud files with Python?