mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-29 21:52:54 +00:00
check isAlive for all the threads before calling join
This commit is contained in:
parent
9ad8976d74
commit
23d09bfa5d
1 changed files with 5 additions and 4 deletions
|
@ -3055,10 +3055,11 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
#wait for download threads to terminate
|
#wait for download threads to terminate
|
||||||
if downloadparallel > 0:
|
if downloadparallel > 0:
|
||||||
while True:
|
for threadcount in xrange(downloadparallel):
|
||||||
if( not threads[0].isAlive()):
|
while True:
|
||||||
break
|
if( not threads[threadcount].isAlive()):
|
||||||
time.sleep(1)
|
break
|
||||||
|
time.sleep(1)
|
||||||
for threadcount in xrange(downloadparallel):
|
for threadcount in xrange(downloadparallel):
|
||||||
threads[threadcount].join()
|
threads[threadcount].join()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue