title: BackgroundWorker is currently busy and cannot run multiple tasks concurrently
body: <p>I have a background worker to run a loop that queries the database until a value is returned. It needs to launch on load and on refresh. The on load seems to run fine, but when I call it again it fails "BackgroundWorker is currently busy and cannot run multiple tasks concurrently"</p>
  
  <p>I added the backgroundworker to my form, added the work it needs to do to the doWork event.</p>
  
  <pre><code>   Private Sub BackgroundWorker1_DoWork(sender As System.Object, e As System.ComponentModel.DoWorkEventArgs) Handles bgwProcessResource.DoWork
          Logic.SetConnection(connectionString)
          materialConfirmed = False
          Dim sqlManager As New BOMIDatabaseManager(connectionString)
          Dim currentInstance As New ResourceInstance(resource, instance)
          Dim results As New Hashtable
          status = Logic.ProcessResource(currentInstance)
          While status.woID.Count &lt;= 0
              status = Logic.ProcessResource(currentInstance)
          End While
          currentWO = status.woID(0)
      End Sub
  
      Private Sub BackgroundWorker1_RunWorkerCompleted(sender As System.Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles bgwProcessResource.RunWorkerCompleted
          WaitingForm.Close()
          'Me.Enabled = False
          currentWO = status.woID(0)
          controller.SelectWorkOrder(status.woID(0), "20")
      End Sub
  </code></pre>
  
  <p>For it to refresh it would have to have already completed so I'm not sure why it's saying it's busy.</p>