1
0
mirror of https://github.com/l1ving/youtube-dl synced 2026-06-08 00:49:29 +08:00

check isAlive for all the threads before calling join

This commit is contained in:
Ravi
2011-07-11 00:20:47 -04:00
Unverified
parent 9ad8976d74
commit 23d09bfa5d
+5 -4
View File
@@ -3055,10 +3055,11 @@ if __name__ == '__main__':
#wait for download threads to terminate
if downloadparallel > 0:
while True:
if( not threads[0].isAlive()):
break
time.sleep(1)
for threadcount in xrange(downloadparallel):
while True:
if( not threads[threadcount].isAlive()):
break
time.sleep(1)
for threadcount in xrange(downloadparallel):
threads[threadcount].join()