diff options
author | Jose <jose@zeroc.com> | 2009-12-16 16:29:39 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2009-12-16 16:29:39 +0100 |
commit | 8b0f54cbb73b47b5a34b555d539f44fbbb88bffa (patch) | |
tree | f3b33d3174be7d4d47bbb0dc3fb9b8eaea51f5ac /cpp/test/IceUtil/thread/RWRecMutexTest.cpp | |
parent | 4479 - IcePHP StaticMutex (diff) | |
download | ice-8b0f54cbb73b47b5a34b555d539f44fbbb88bffa.tar.bz2 ice-8b0f54cbb73b47b5a34b555d539f44fbbb88bffa.tar.xz ice-8b0f54cbb73b47b5a34b555d539f44fbbb88bffa.zip |
4480 - add ICE_DEPRECATED_API to StaticMutex & RWRecMutex
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 |