diff options
author | Matthew Newhook <matthew@zeroc.com> | 2001-11-27 21:46:38 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2001-11-27 21:46:38 +0000 |
commit | aa18d7c48e6940f02f235bafdd317daa1ee9b590 (patch) | |
tree | a218b4a2dcb582bbed27d741404ed0106554ff6b /cpp/src/IceStorm/TopicManagerI.cpp | |
parent | stream fixes (diff) | |
download | ice-aa18d7c48e6940f02f235bafdd317daa1ee9b590.tar.bz2 ice-aa18d7c48e6940f02f235bafdd317daa1ee9b590.tar.xz ice-aa18d7c48e6940f02f235bafdd317daa1ee9b590.zip |
Add new administrative utility. Implement IceStorm::Topic::destroy.
Diffstat (limited to 'cpp/src/IceStorm/TopicManagerI.cpp')
-rw-r--r-- | cpp/src/IceStorm/TopicManagerI.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cpp/src/IceStorm/TopicManagerI.cpp b/cpp/src/IceStorm/TopicManagerI.cpp index 7a282c28baa..49bfe3dbe1e 100644 --- a/cpp/src/IceStorm/TopicManagerI.cpp +++ b/cpp/src/IceStorm/TopicManagerI.cpp @@ -211,5 +211,28 @@ TopicManagerI::shutdown() void TopicManagerI::reap() { + // + // Always Called with mutex locked + // + // JTCSyncT<JTCMutex> sync(*this); + // + TopicIMap::iterator i = _topicIMap.begin(); + while (i != _topicIMap.end()) + { + if (i->second->destroyed()) + { + if (_traceLevels->topicMgr > 0) + { + ostringstream s; + s << "Reaping " << i->first; + _communicator->getLogger()->trace(_traceLevels->topicMgrCat, s.str()); + } + _topicIMap.erase(i++); + } + else + { + ++i; + } + } } |