/////////////////////////////////////////////////////////////////// // testDriver.cpp - a test driver for thread class // // ver 1.0 // // // // Jim Fawcett, CSE691/791 - SW Modeling & Analysis, Fall 2001 // /////////////////////////////////////////////////////////////////// #include #include "lockingPtr.h" #include "threads.h" class testThread : public thread { protected: virtual void run() { safeOut sout(std::cout); int i; for(i=0; i<20; i++) sout << "\n testing child thread processing"; } }; void main() { safeOut sout(std::cout); sout << "\n Demonstrating use of Thread Class in a Seperate Module " << "\n =========================================================\n"; testThread t; t.start(); int i; for(i=0; i<20; i++) sout << "\n testing main thread processing"; sout << "\n\n"; t.wait(); }