Use a queue to store the list of files to download, then make workers take a file from the queue when they're free. This avoids the unfortunate scenario in which one worker finishes faster than the other ones, leaving it idling.
Smooth progress reporting is achieved by using thread-local storage, which I don't consider an ideal solution, but I couldn't find a better one.
Use a queue to store the list of files to download, then make workers take a file from the queue when they're free. This avoids the unfortunate scenario in which one worker finishes faster than the other ones, leaving it idling.
Smooth progress reporting is achieved by using thread-local storage, which I don't consider an ideal solution, but I couldn't find a better one.