title: If Task.Delay is to be prefered over Thread.Sleep, why examples in this book use Thread.Sleep?
body: <p>I am reading Exam Ref 70-483: Programming in C# by Wouter de Kort.<br />
  The writer doesn't explicitly mention the version of C#, but I guess it's 5.0 since he makes heavy use of async/await keywords.</p>
  <p>The examples in this book only use Thread.Sleep() and not Task.Delay()</p>
  <pre><code>Parallel.For(0, 10, i =&gt;
  {
      Thread.Sleep(1000);
  });
  </code></pre>
  <p>,</p>
  <pre><code>Task.Run(() =&gt;
  {
      bag.Add(42);
      Thread.Sleep(1000);
      bag.Add(21);
  });
  </code></pre>
  <p>etc etc...</p>
  <p>From other reading/SO questions like <a href="https://stackoverflow.com/questions/20082221/when-to-use-task-delay-when-to-use-thread-sleep" title="this">this</a>, I'd figure that</p>
  <pre><code>await Task.Delay(1000)
  </code></pre>
  <p>should generally do better in a parallel context than</p>
  <pre><code>Thread.Sleep(1000)
  </code></pre>
  <p>because Task.Delay leaves it's thread unhindered thus allowing other tasks execute on it.<br />
  I've just Ctrl-F'd the book and it didn't find a single occurrence for Task.Delay!
  I'm confused between community opinions from the internet and official Microsoft book.<br />
  <strong>If Task.Delay is a good practice, why doesn't this book address it in any way?</strong><br />
  Or did I miss something?</p>