I am using background threads to run intense search processes in order to allow the UI to be fully accessible. After creating each bgw I update a datagridview which shows the different threads and current status. however once they complete, I have no way or at least I dont know of a way to update the status on the datagridview specific to each backgroundworker.
Try
bgw.RunWorkerAsync()
queuelist.Enqueue(bgw)
If Not Thread.CurrentThread.Name = "Main Thread" Then
Dim record As String() = {jobNum, clientProj & jobNum, jobStartTime, bgw.IsBusy.ToString}
DataGridView1.Rows.Add(record)
End If
Catch ex As Exception
MessageBox.Show("An Error Occured:" & vbNewLine & ex.Message)
End Try
this sets the datagridviewer once the threads begin, but once it ends I dont know how to update or know which thread ended. I tried putting them into a queue but I cannot identify a specific worker when i dequeue.
any ideas