title: Task.Factory.StartNew does not work when run without debug mode
body: <p>This is the first time i am implementing Task.Factory.StartNew, so i dont have much idea about it. I have a function that returns a boolean value and takes a parameter. Now I have called my function using Task.Factory.StartNew. </p>
  
  <pre><code>Task.Factory.StartNew(Function() Myfunction(stringvalue))
  </code></pre>
  
  <p>When i am in debug mode it works and does all the operation. But when i run it without debug, it does not work. I had placed a Response.Write inside that function and it did not execute that, so it just does not enter into that function.</p>
  
  <p>Below is the function that shows what am i trying to do</p>
  
  <p>My Button Click event</p>
  
  <pre><code>Private Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
   Tasks.Task.Factory.StartNew(Function() Myfunction("Somevalue"))
  End Sub
  </code></pre>
  
  <p>My function</p>
  
  <pre><code>Private Function Myfunction(ByVal str as String) as Boolean
  Dim isSuccess as Boolean = False
  Dim Id as Integer = SomeOtherFunction(str)
  If Id &gt; 0 Then
  isSuccess =  AnotherFunction(Id)
  
  End If
  Return isSuccess
  End Function
  </code></pre>
  
  <p>If i use    Tasks.Task.Factory.StartNew(Function() Myfunction("Somevalue")).Start(), it works and does what the function is expected to do, but i get exception saying - "Start may not be called on a task that was already started"</p>
  
  <p>What am i doing wrong?</p>