I have a wpf project, and on the timeconsuming processing, I run the method on a background worker. like so
object tempArguments = new object;
tempArguments = connString;
tempArguments = "FULL";
tempArguments = clientID;
then when user hits button I run
//check for background workers to complete
if (myInternalLoginClass.backgroundWorkerTimeline.IsBusy) myInternalLoginClass.backgroundWorkerTimeline.CancelAsync();
***next line of code here
I was thinking that as long as I put in that continuous loop, while busy... do nothing,
the backgroundthread would run until finished, then since it was complete, it would hit ***next line of code here.
but when I try this the loop never exits... the workers stays in IsBusy.
Am I thinking about this the wrong way? Even when I hit cancelasync and check in the background thread... it stays ISBUSY?