I have a breadth first search that I've been toying with for a bit, and it works very well. The problem is, that if it has to perform more than a certain number of comparisons it freezes my computer. I tried adding a backgroundWorker but it never completes the function. It enters, according to the various break points I've added but never completes it. Is there a certain amount of code that a background worker will do or is there more that I need to add then the following:
Code:
form1()
{
//various setups for the search
backgroundWorker1.DoWork += new doWorkEventHandler(backgroundWorker1_DoWork);
backgroundWorker1.RunWorkerAsync();
}
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
breadthFirst();
}
all the variables are global so it shouldn't be a problem with variable passing. Any help would be very appreciated.