diff options
Diffstat (limited to 'cpp/test/IceUtil/thread/RWRecMutexTest.cpp')
-rw-r--r-- | cpp/test/IceUtil/thread/RWRecMutexTest.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/cpp/test/IceUtil/thread/RWRecMutexTest.cpp b/cpp/test/IceUtil/thread/RWRecMutexTest.cpp index 167c05bac9a..a74fda1e708 100644 --- a/cpp/test/IceUtil/thread/RWRecMutexTest.cpp +++ b/cpp/test/IceUtil/thread/RWRecMutexTest.cpp @@ -7,6 +7,14 @@ // // ********************************************************************** +// +// We disable deprecation warning here, to allow clean compilation of +// of deprecated methods. +// +#ifdef _MSC_VER +# pragma warning( disable : 4996 ) +#endif + #include <IceUtil/IceUtil.h> #include <RWRecMutexTest.h> @@ -837,15 +845,15 @@ RWRecMutexTest::run() // write thread cannot get the write lock. // t1->waitUpgrade(); -
- RWRecMutexWriteThreadPtr t2 = new RWRecMutexWriteThread(mutex);
- ThreadControl control2 = t2->start();
+ + RWRecMutexWriteThreadPtr t2 = new RWRecMutexWriteThread(mutex); + ThreadControl control2 = t2->start(); t2->waitWrite(); - //
- // Its necessary to sleep for 1 second to ensure that the
- // thread is actually IN the write lock and waiting.
- //
- ThreadControl::sleep(Time::seconds(1));
+ // + // Its necessary to sleep for 1 second to ensure that the + // thread is actually IN the write lock and waiting. + // + ThreadControl::sleep(Time::seconds(1)); // // Unlocking the read mutex lets the upgrade continue. At this |