Reputation: 294
I'm starting several python processes with downloads in a loop that calls this piece of code:
startTimeMillis = int(round(time.time() * 1000))
for i in range(10):
p = multiprocessing.Process(target=performCurl, args =("http://www.google.com/d", i, ))
p.start()
endTimeMillis = int(round(time.time() * 1000))
totalTimeSeconds = (endTimeMillis - startTimeMillis)
print "The whole process took ", str(totalTimeSeconds)
I want to check the time it takes for all the processes to finish, so how would I make the last part of the code to wait for all the processes?
Upvotes: 3
Views: 11005