title: Task.Run() in async method causes thread pool starvation?
body: <p>I have this piece of code in my .netcore application</p>
  
  <pre><code>[HttpPost]
  [Route("doSomething")]
  public async Task&lt;IActionResult&gt; DoSomethingAsync([FromBody] Input input)
  {
      // Do Something
      var task1 = Task.Run(async () =&gt; 
      {
          await taskFactory.DoTask(input);
      });
  
      // Do Something Differently
      var task2 = Task.Run(async () =&gt; 
      {
          await taskFactory.DoAnotherTask(input);
      });
  
      await Task.WhenAll(task1, task2);
  
      return Accepted();
  }
  </code></pre>
  
  <p><code>DoTask()</code> and <code>DoAnotherTask()</code> are both independent of each other and can be executed in parallel but they have to be awaited until both of them are in completed status.</p>
  
  <p>So, I created two tasks and awaited them using <code>Task.WhenAll()</code>.</p>
  
  <p>But I have got a review comment to not use <code>Task.Run()</code> in an <code>async</code> method as it can lead to thread pool starvation. </p>
  
  <p>Question 1: How does my code leading to thread pool starvation?<br>
  Question 2: If it is leading to thread pool starvation, how can I run both tasks in parallel?</p>