summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/session/ReapThread.h
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2005-04-27 01:17:29 +0000
committerMatthew Newhook <matthew@zeroc.com>2005-04-27 01:17:29 +0000
commit28b4ee78d72e2776443f185581f553c1f19780ae (patch)
treee532ded3c9db6cc934ebbca60c17273ea2e4277a /cpp/demo/Ice/session/ReapThread.h
parentMade finalizers thread-safe. (diff)
downloadice-28b4ee78d72e2776443f185581f553c1f19780ae.tar.bz2
ice-28b4ee78d72e2776443f185581f553c1f19780ae.tar.xz
ice-28b4ee78d72e2776443f185581f553c1f19780ae.zip
removed singleton. removed friends.
Diffstat (limited to 'cpp/demo/Ice/session/ReapThread.h')
-rwxr-xr-xcpp/demo/Ice/session/ReapThread.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/cpp/demo/Ice/session/ReapThread.h b/cpp/demo/Ice/session/ReapThread.h
index 33fdc7333d9..1c4e410ee13 100755
--- a/cpp/demo/Ice/session/ReapThread.h
+++ b/cpp/demo/Ice/session/ReapThread.h
@@ -11,30 +11,22 @@
#define REAP_THREAD_H
#include <IceUtil/Thread.h>
-#include <IceUtil/StaticMutex.h>
#include <SessionI.h>
#include <list>
-class ReapThread;
-typedef IceUtil::Handle<ReapThread> ReapThreadPtr;
-
class ReapThread : public IceUtil::Thread, public IceUtil::Monitor<IceUtil::Mutex>
{
public:
- static ReapThreadPtr& instance();
+ ReapThread();
virtual void run();
-
void terminate();
-
void add(const Demo::SessionPrx&, const SessionIPtr&);
private:
- ReapThread();
-
const IceUtil::Time _timeout;
bool _terminated;
struct SessionProxyPair
@@ -45,9 +37,7 @@ private:
const SessionIPtr session;
};
std::list<SessionProxyPair> _sessions;
-
- static ReapThreadPtr _instance;
- static IceUtil::StaticMutex _instanceMutex;
};
+typedef IceUtil::Handle<ReapThread> ReapThreadPtr;
#endif