diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp b/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp index d3d33f744a8..f2f32b69fcc 100644 --- a/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp +++ b/TAO/orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp @@ -137,67 +137,6 @@ TAO_ESF_Copy_On_Write<PROXY,C,I,ACE_SYNCH_USE>:: ace_mon.copy->collection.shutdown (ACE_TRY_ENV); } -template<class COLLECTION, class ITERATOR, ACE_SYNCH_DECL> -TAO_ESF_Copy_On_Write_Write_Guard<COLLECTION,ITERATOR,ACE_SYNCH_USE>:: - TAO_ESF_Copy_On_Write_Write_Guard (ACE_SYNCH_MUTEX_T &m, - ACE_SYNCH_CONDITION_T &c, - int &p, - int &w, - Collection*& cr) - : copy (0), - mutex (m), - cond (c), - pending_writes (p), - writing_flag (w), - collection (cr) -{ - { - ACE_GUARD (ACE_SYNCH_MUTEX_T, ace_mon, this->mutex); - - this->pending_writes++; - - while (this->writing_flag != 0) - this->cond.wait (); - - this->writing_flag = 1; - } - - // Copy outside the mutex, because it may take a long time. - // Nobody can change it, because it is protected by the - // writing_flag. - - // First initialize it (with the correct reference count - ACE_NEW (this->copy, Collection); - // Copy the contents - this->copy->collection = this->collection->collection; - - // Increase the reference counts - ITERATOR end = this->copy->collection.end (); - for (ITERATOR i = this->copy->collection.begin (); i != end; ++i) - { - (*i)->_incr_refcnt (); - } -} - -template<class COLLECTION, class ITERATOR, ACE_SYNCH_DECL> -TAO_ESF_Copy_On_Write_Write_Guard<COLLECTION,ITERATOR,ACE_SYNCH_USE>:: - ~TAO_ESF_Copy_On_Write_Write_Guard (void) -{ - Collection *tmp = 0; - { - ACE_GUARD (ACE_SYNCH_MUTEX_T, ace_mon, this->mutex); - - tmp = this->collection; - this->collection = this->copy; - this->writing_flag = 0; - this->pending_writes--; - - this->cond.signal (); - } - // Delete outside the mutex, because it may take a long time. - tmp->_decr_refcnt (); -} - // **************************************************************** #endif /* TAO_ESF_COPY_ON_WRITE_CPP */ |