diff options
author | Marc Laukien <marc@zeroc.com> | 2005-04-19 12:46:41 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2005-04-19 12:46:41 +0000 |
commit | 8e8f98c8fb212e38622e22e70d880d1ec5c06c2a (patch) | |
tree | 58e08d7c52d7b5d681836eb2b4fc7c4880524bff /cpp/demo/Ice/session/ReapThread.h | |
parent | Fix (diff) | |
download | ice-8e8f98c8fb212e38622e22e70d880d1ec5c06c2a.tar.bz2 ice-8e8f98c8fb212e38622e22e70d880d1ec5c06c2a.tar.xz ice-8e8f98c8fb212e38622e22e70d880d1ec5c06c2a.zip |
comments
Diffstat (limited to 'cpp/demo/Ice/session/ReapThread.h')
-rwxr-xr-x | cpp/demo/Ice/session/ReapThread.h | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/cpp/demo/Ice/session/ReapThread.h b/cpp/demo/Ice/session/ReapThread.h index 7667e8b16dd..012dac82f47 100755 --- a/cpp/demo/Ice/session/ReapThread.h +++ b/cpp/demo/Ice/session/ReapThread.h @@ -22,27 +22,13 @@ public: static ReapThreadPtr& instance(); - virtual ~ReapThread(); + virtual ~ReapThread(); // XXX Destructor does nothing, get rid of it. virtual void run(); - // XXX Rename to destroy(). - // - // I named it terminate because destroy() methods in Java result - // in a deprecation warning. If you want to use destroy() in Java - // then I would have to use a runnable which means the demo isn't - // the same code. Given the difference is a method name, I didn't - // think it was worth the cost of different code. - // void terminate(); - // XXX: The alternative here is to make timestamp() a slice - // method. However, this means that we're adding methods to the - // slice interface which is only required for the reaping thread, - // and it obviously couldn't return an IceUtil::Time but instead - // some other representation... - // - void add(const ::Demo::SessionPrx&, const SessionIPtr&); + void add(const Demo::SessionPrx&, const SessionIPtr&); private: @@ -50,7 +36,10 @@ private: const IceUtil::Time _timeout; bool _terminated; - std::map< ::Demo::SessionPrx, SessionIPtr> _sessions; + // XXX Why is this a map and not simply a list of + // pair<Demo::SessionPrx, SessionIPtr> (or a list of structs with + // these elements)? The sorting of a map is needed nowhere. + std::map< Demo::SessionPrx, SessionIPtr> _sessions; static ReapThreadPtr _instance; static IceUtil::StaticMutex _instanceMutex; |