I have a C++ loop that connects to a website and gets response from the website.
It looks something like this:
for(int i = 0; i < 1000; i++) {
//connect to website and get response
}
the problem is, for each iteration of the loop, it takes about 4-5 seconds to connect to the website and get response, so only having 1 thread won't be fast enough. How would I, say, run this loop in 3 or 4 threads? (to speed it up)