Multithreaded Programming Guide

Common Oversights

The following list points out some of the more frequent oversights that can cause bugs in multithreaded programs.

And, note that multithreaded programs (especially those containing bugs) often behave differently in two successive runs, given identical inputs, because of differences in the thread scheduling order.

In general, multithreading bugs are statistical instead of deterministic. Tracing is usually a more effective method of finding order of execution problems than is breakpoint-based debugging.