From: <ric...@us...> - 2009-09-26 23:49:17
|
Revision: 1025 http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1025&view=rev Author: rich_sposato Date: 2009-09-26 23:49:05 +0000 (Sat, 26 Sep 2009) Log Message: ----------- Added test for pointer to const object. Modified Paths: -------------- trunk/test/LockingPtr/main.cpp Modified: trunk/test/LockingPtr/main.cpp =================================================================== --- trunk/test/LockingPtr/main.cpp 2009-09-26 23:07:10 UTC (rev 1024) +++ trunk/test/LockingPtr/main.cpp 2009-09-26 23:49:05 UTC (rev 1025) @@ -99,6 +99,8 @@ { std::vector<Thread*> threads; + Printf("--------------------------------------------------------------------------------------\n"); + for(int i=0; i<numThreads; i++) { Printf("Creating thread %d\n")(i); @@ -111,8 +113,19 @@ Thread::DeleteThreads(threads); Printf("--------------------------------------------------------------------------------------\n"); + + for(int i=0; i<numThreads; i++) + { + Printf("Creating thread %d\n")(i); + threads.push_back(new Thread(RunConstLocked,reinterpret_cast<void*>(i))); + } + for(int i=0; i<numThreads; i++) + threads.at(i)->start(); + + Thread::JoinThreads(threads); + Thread::DeleteThreads(threads); + Printf("--------------------------------------------------------------------------------------\n"); - Printf("--------------------------------------------------------------------------------------\n"); for(int i=0; i<numThreads; i++) { @@ -125,6 +138,7 @@ Thread::JoinThreads(threads); Thread::DeleteThreads(threads); + Printf("--------------------------------------------------------------------------------------\n"); // test pair ctor volatile A a; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |