title: Asynchronous I/O with multiple thread C#
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/10806951/how-to-limit-the-amount-of-concurrent-async-i-o-operations">How to limit the amount of concurrent async I/O operations?</a>  </p>
  </blockquote>
  
  
  
  <p>Let say i have an string array</p>
  
  <pre><code>string[] domains = { "domain1.com", "domain2.com" ,..., "domain100.com"};
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I'm kind of new at programming multithread so hope you can help me out. Thanks a lot</p>