Answer the question
In order to leave comments, you need to log in
How to implement multithreading in the parser?
I need help, I want to make an ip address parser for availability.
I want to do work on 800 ip addresses at the same time, I decided to do it through streams, but when launched with streams, the program closes with an error:
I understand that there is an error with vectors: and from this I have 2 questions: what is actually wrong with vectors, and how is it more correct to implement multithreading in such a task?
int k;
for each (string ip in iplist)
{
threads[k] = thread(CheckPort, ip, 8080, 1);
//CheckPort(ip, 8080, 1);
k++;
}
Sleep(1000);
for (int l = 0; l < k; l++) {threads[k].join();}
Sleep(8000);
k = 0;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question