-2

I have a file with around 50,000 domain names with a domain name in each line. I want to read the file and find which domains are alive and write them to a different file. I am using ping to find the live domains. But it takes a lot of time to process. How can I do this using multi-threading.

Ubi
  • 104
  • 10

1 Answers1

2

You would not want to do all in parallel! The best approach would be to use a Queue to store all the domain names, and a set of workers to do the job of pinging. This way you can control very easily how many parallel workers work.

Arvind
  • 124
  • 6