title: "New Thread" and Async
body: <p>I did a sample to simulate concurrency using the code below:</p>
  
  <pre><code>var threads = new Thread[200]; 
  //starting threads logic
  for (int i = 0; i &lt; 200; i++)
           {
               threads[i].Start();
           }
           for (int i = 0; i &lt; 200; i++)
           {
               threads[i].Join();
           } 
  </code></pre>
  
  <p>The code is supposed to insert thousands of records to the database and it seems to work well, as the threads finished at almost the same time.</p>
  
  <p>But, when I use: </p>
  
  <pre><code> var tasks = new List&lt;Task&lt;int&gt;&gt;();
          for (int i = 0; i &lt; 200; i++)
          {
              tasks.Add(insert(i));
              //   await insert(i);
          }
          int[] result = await Task.WhenAll(tasks);
  </code></pre>
  
  <p>it takes a lot of time to finish the same logic.</p>
  
  <p>Can someone explain to me what's the difference? I thought that <code>Await</code> should create threads.</p>