diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Object_T.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/Object_T.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Object_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Object_T.cpp index 54e3ba5ed57..9f0293ef589 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Object_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Object_T.cpp @@ -28,6 +28,15 @@ TAO_NS_Object_T<TYPE, PARENT>::destroy (TYPE *type ACE_ENV_ARG_DECL) { TAO_NS_Refcountable_Guard ref_guard(*this); // Protect this object from being destroyed in the middle of its shutdown sequence. + { + ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); + + if (this->shutdown_ == 1) + return; // Another thread has already run shutdown. + + this->shutdown_ = 1; + } + this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; |