You create a channel and run `N` worker coroutines...
# coroutines
e
You create a channel and run
N
worker coroutines that all take tasks from this channel and do your http calls. The number of coroutines you have limits the number of concurrent HTTP requests without having you think about threads at all. In fact, if your HTTP library is truly async, they can all simply run a single thread, yet still giving you control over maximal concurrency.
g
@oshai I’ve posted an answer to your SO question.
o
Thanks, I reviewed it and edit the question a bit (it was a mistake not to have local var for the thread pool) my question is if in that case it is working because threads are blocked?
g
Answered
o
Thanks