title: Are there any restrictions of nested Task.WhenAll?
body: <p>Let's imagine some abstract code</p>
  <pre><code>    private void Main()
      {
          var workTask1 = DoWork1();
          var workTask2 = DoWork2();
          var workTask3 = DoWork3();
  
          await Task.WhenAll(workTask1, workTask2, workTask3);
  
          AnalyzeWork(workTask1.Result, workTask2.Result, workTask3.Result);
      }
  
      private async Task&lt;object&gt; DoWork1()
      {
          var someOperationTask1 = someOperation1();
          var someOperationTask2 = someOperation2();
  
          await Task.WhenAll(someOperationTask1, someOperationTask2);
  
          return new object
          {
              SomeOperationResult1 = someOperationTask1.Result,
              SomeOperationResult2 = someOperationTask2.Result,
          };
      }
  
      private async Task&lt;object&gt; DoWork2()
      {
          var someOperationTask3 = someOperation3();
          var someOperationTask4 = someOperation4();
  
          await Task.WhenAll(someOperationTask3, someOperationTask4);
  
          return new object
          {
              SomeOperationResult3 = someOperationTask3.Result,
              SomeOperationResult4 = someOperationTask4.Result,
          };
      }
  
      private async Task&lt;object&gt; DoWork3()
      {
          var someOperationTask5 = someOperation5();
          var someOperationTask6 = someOperation6();
  
          await Task.WhenAll(someOperationTask5, someOperationTask6);
  
          return new object
          {
              SomeOperationResult5 = someOperationTask5.Result,
              SomeOperationResult6 = someOperationTask6.Result,
          };
      }
  </code></pre>
  <p>Where 3 methods are being run parallelly and each of them consists of 2 parallel's operations. And result of 3 methods is passed to some method.</p>
  <p>My question is there are any restrictions? Is it ok to have nested Task.WhenAll and what's difference between nested Task.WhenAll and one level Task.WhenAll operations?</p>