I have a program that I'm using a QProcess to call wget to download thousands of files.
If I were to start a thread for each file to download it, could I do it without explicitly creating QThread objects? For example:
For i from 0 to 10
myThread(i);
End for
For i from 0 to 10
myThread(i);
End for
To copy to clipboard, switch view to plain text mode
Would this work or would the thread get destroyed when it goes to the next iteration of the for loop? Basically the files I'm working with are numbers so I just send it i.
I ask this because if i did something like this:
For i from 0 to 10
myThread object(i);
End for
For i from 0 to 10
myThread object(i);
End for
To copy to clipboard, switch view to plain text mode
Wouldn't this cause conflicts? Wouldn't the object get destroyed possibly before it finishes or it would be assigned a new file to download? As you can tell, this is my first time dealing with threads!
Thank you so much for your help!
Bookmarks