First, the SeedQueue <-> HttpQueue interaction with the blocking event signal receive_seed_queue was refactored. With the new implementation, SeedQueue wasn't effectively prevented from stacking big amounts of items into the HttpQueue. Second, another deadlock condition should be fixed. HttpQueue signalled to the main thread to have stopped, but its threads that would sometimes still receive http responses would continue working, putting items after the queues "promised" not to do so, and blocking the join with the main thread, hanging indefinitely. HttpQueue now only signals having stopped after its threads close.
First, the SeedQueue <-> HttpQueue interaction with the blocking event signal receive_seed_queue was refactored. With the new implementation, SeedQueue wasn't effectively prevented from stacking big amounts of items into the HttpQueue. Second, another deadlock condition should be fixed. HttpQueue signalled to the main thread to have stopped, but its threads that would sometimes still receive http responses would continue working, putting items after the queues "promised" not to do so, and blocking the join with the main thread, hanging indefinitely. HttpQueue now only signals having stopped after its threads close.