A view from the time machine. That is the 1995 view of threads. Much of it is still true, some of it isn't.
I would recommend that anyone using threads run their program through the Helgrind tool from the Valgrind folk. It does a nice job of noticing if you missed a lock on a shared variable by instrumenting and analyzing your program at run time. (It caught me on one in my most recent program. I knew I hadn't started any threads when I made the access, still I should have had a lock there in case I later changed the initialization order.)
I would recommend that anyone using threads run their program through the Helgrind tool from the Valgrind folk. It does a nice job of noticing if you missed a lock on a shared variable by instrumenting and analyzing your program at run time. (It caught me on one in my most recent program. I knew I hadn't started any threads when I made the access, still I should have had a lock there in case I later changed the initialization order.)