wchristian/parallel-downloader — pull request #2 by fsievers (2013-07-22 10:01:16+00:00)
Title: Fix failure when exceeding workers

These two commits fixes the problem, that you get undefined responses when you have more requests than workers.

I added a writter method to _cv called _set_cv to reassign a new CondVar if the Condition has been eaten by calling _cv->send.
In the run method, I add a while loop around the for loop, that spawns the requests. This loop runs until there're no more requests in the consumable_list and reinitialize _cv with a new CondVar on every loop.