I am trying to process files in over 1000 directories. However, as the size of the directory is very big, i have to run the process concurrently to save time. The dir [:100] is so that that function has only 100 directories to process.However, the 2nd Thread does not start until the first Thread has finished.
def sort(start,end): dir = os.list(filepath) dir = dir [start:end] for file in dir: ~process~ print result if __name__ == '__main__': Thread(target = Sort(0,100)).start() Thread(target = Sort(100,200)).start() I have tried duplicating the Sort function as Sort2(): but this yields the same result
Thread(target = Sort(0,100)).start() Thread(target = Sort2(100,200)).start() Any help or direction is greatly apprenticed