title: Calling cancellationToken.Cancel() in Dispose of Controller?
body: <p>I have controller, where I create a Cancellation Token in the constructor and use it in a long running await task (). Does disposing the Cancellation token in Controller.Dispose() causes the long running task to cancel?</p>
  
  <pre><code>public class SomeController : BaseInternalController
  {
      private CancellationTokenSource cancellationTokenSource;
  
      public MyController()
      {
          cancellationTokenSource = new CancellationTokenSource();
      }
  
      public async Task&lt;HttpResponseMessage&gt; Post(SomeData data)
      {
          foreach (var item in data)
          {
              await longRunningTask(item, cancellationTokenSource.token);
          }
  
      }
  
      protected override void Dispose(bool disposing)
      {
          if (cancellationTokenSource != null)
          {
              cancellationTokenSource.Cancel();
              cancellationTokenSource.Dispose();
              cancellationTokenSource = null;
          }
          base.Dispose(disposing);
      }
  }
  </code></pre>