diff options
Diffstat (limited to 'cpp/test/Ice/operations/TestAMDI.cpp')
-rw-r--r-- | cpp/test/Ice/operations/TestAMDI.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cpp/test/Ice/operations/TestAMDI.cpp b/cpp/test/Ice/operations/TestAMDI.cpp index 0227c30075f..f3baed1e676 100644 --- a/cpp/test/Ice/operations/TestAMDI.cpp +++ b/cpp/test/Ice/operations/TestAMDI.cpp @@ -37,10 +37,13 @@ private: void MyDerivedClassI::shutdown_async(const Test::AMD_MyClass_shutdownPtr& cb, const Ice::Current& current) { - if(_opVoidThread) { - _opVoidThread->getThreadControl().join(); - _opVoidThread = 0; + IceUtil::Mutex::Lock sync(_opVoidMutex); + if(_opVoidThread) + { + _opVoidThread->getThreadControl().join(); + _opVoidThread = 0; + } } current.adapter->getCommunicator()->shutdown(); @@ -50,6 +53,7 @@ MyDerivedClassI::shutdown_async(const Test::AMD_MyClass_shutdownPtr& cb, const I void MyDerivedClassI::opVoid_async(const Test::AMD_MyClass_opVoidPtr& cb, const Ice::Current&) { + IceUtil::Mutex::Lock sync(_opVoidMutex); if(_opVoidThread) { _opVoidThread->getThreadControl().join(); |