Your main thread fills the first queue with all th...
# coroutines
m
Your main thread fills the first queue with all the input, and drains all the results out of the second queue. If each task takes a small amount of time, group them into lists of 1000 or so to avoid the worker threads contending for the queue locks.