Possible Duplicate:
How to limit the amount of concurrent async I/O operations?
Let say i have an string array
string[] domains = { "domain1.com", "domain2.com" ,..., "domain100.com"};
I want to write an app that use 5 threads to send request to those domains and save the response header to the same log file in order of started. For example:
Thread 1
domain1.com
Response header
Thread 2
domain2.com
Response header
Thread 3
domain3.com
Response header
Thread 4
domain4.com
Response header
Thread 5
domain5.com
Response header
Thread 1
domain6.com
Response header
Thread 2
domain7.com
Response header
I'm kind of new at programming multithread so hope you can help me out. Thanks a lot