title: How to cancel a task that is waiting with a timeout without exceptions being thrown
body: <p>When canceling a task that has a timeout (before the timeout has ended) using a cancel token an exception is thrown.  Example: </p>
  
  <pre><code>mytask.start();
  bool didTaskRunInTime = mytask.wait(5 mins, _cancelToken);
  </code></pre>
  
  <p>Which means I cannot go on like below.</p>
  
  <pre><code>//was the task cancelled
  if (_cancelToken.IsCancelRequested)
  {
      // log cancel from user to file etc
  }
  
  if (didTaskRunInTime )
  {
      int taskResult = myTask.Result;
      // log result to file
  }
  else if (!_cancelToken.IsCancelRequested)
  {
      // Tell user task timed out , log a message etc
  }
  </code></pre>
  
  <p>I will have to do all this in my catch block and my code is looking messy. What is the correct way to do this? </p>