The single nastiest bug I’ve ever seen was a multithreading problem. By the time I finally fixed it, over 3 whole weeks had elapsed. Now, that particular bug was an extreme case, and most multithreading issues aren’t quite so bad. But the fact remains that multithreaded development is not for the timid. Debugging those programs is just plain hard, and if you’re on a tight schedule, then you might want to consider avoiding the entire issue by designing your program in a single-threaded fashion or with only minimal thread support. Used properly, multithreading can provide huge benefits. But be prepared to pay for those benefits with drastically increased debugging time.
KeywordsRace Condition Multiple Thread Multithreaded Program Lock Statement Thread Synchronization
Unable to display preview. Download preview PDF.