Subj : Re: Unit Testing for Thread-Safe code To : comp.programming.threads From : Gianni Mariani Date : Tue Mar 08 2005 01:36 am Initial-N wrote: > Hi all, > > This is proabably a very stupid question, yet anyone might have > thought of, when they try to programm anything in parallel system. > > I wonder if there is any existing way/pattern/code/tool or even > practice for doing unit testing for any source code/class/module for > thread-safe issue. > I believe any effort to make code thread-safe, and always run an unit > testing for your code is a first-step of defensive programming > practice, before getting into the crazy mutli-threaded bug. > > Thanks in advance for any comment. I usually invoke an "array" of threads to test the code in question. See Austria C++ http://austria.sourceforge.net/. There will soon be a new release that has more tests. .