title: How do I force a task cancellation?
body: <p>Assume, there is a task containing the following actions approximately:</p>
  
  <pre><code>Task someTask = new Task(() =&gt; {
  
    while(!IsCancellationRequested) {
  
      Do_something_over_a_long_period_of_time();
      token.ThrowIfCancellationRequested();
  
      Do_something_over_a_long_period_of_time();
      token.ThrowIfCancellationRequested();
  
      Do_something_over_a_long_period_of_time();
      token.ThrowIfCancellationRequested();
    }
  });
  someTask.Start();
  </code></pre>
  
  <p>And there are pretty impatient users. They long to terminate my application immediately. They don't want to wait while long action is running.</p>
  
  <p>I used to use the <code>Thread</code> class and was able to abort all my threads immediately with invoking the <code>Abort()</code> command.</p>
  
  <p>How do I abort my tasks immediately?</p>
  
  <p>Thank you.</p>