Avoiding Race Conditions with a BackgroundWorker

added by BucketSoft
10/7/2011 9:06:10 AM

442 Views

What is a race condition you say? Well, simply put, it's when two or more threads race to an event or line of code. Sometimes one thread will win the race, and sometimes the other thread will. What this comes down to is that this inconsistent behavior can cause some strange and unexpected results.


1 comments

vijayst
10/7/2011 10:01:55 PM
The post is an interesting read. Thanks.

It looks like the Cancelled flag of RunWorkerCompletedEventArgs is not a reliable way to check the Cancelled status.