title: Whats the benefit of passing a CancellationToken as a parameter to Task.Run?
body: <p>Obviously I realize it enables me to cancel the task, but this code achieves the same effect without having to pass the token into Task.Run</p>
  
  <p>What is the practical difference?  Thanks.</p>
  
  <pre><code>Dim cts As New CancellationTokenSource
  Dim ct As CancellationToken = cts.Token
  Task.Run(Sub()
               For i = 1 To 1000
                   Debug.WriteLine(i)
                   ct.ThrowIfCancellationRequested()
                   Threading.Thread.Sleep(10)
               Next
           End Sub)
  
  cts.CancelAfter(500)
  </code></pre>
  
  <p>VS</p>
  
  <pre><code>Dim cts As New CancellationTokenSource
  Dim ct As CancellationToken = cts.Token
  Task.Run(Sub()
               For i = 1 To 1000
                   Debug.WriteLine(i)
                   ct.ThrowIfCancellationRequested()
                   Threading.Thread.Sleep(10)
               Next
           End Sub, ct)
  
  cts.CancelAfter(500)
  </code></pre>