summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ReapThread.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2006-09-04 07:16:49 +0000
committerMatthew Newhook <matthew@zeroc.com>2006-09-04 07:16:49 +0000
commitf99970bd52104537bed20ed7c7211f90899a27ca (patch)
tree12a6d3c6187c69b2eec1df81c65863f83111227f /cpp/src/IceGrid/ReapThread.cpp
parenthttp://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1331 (diff)
downloadice-f99970bd52104537bed20ed7c7211f90899a27ca.tar.bz2
ice-f99970bd52104537bed20ed7c7211f90899a27ca.tar.xz
ice-f99970bd52104537bed20ed7c7211f90899a27ca.zip
replaced two reaper threads with one.
Diffstat (limited to 'cpp/src/IceGrid/ReapThread.cpp')
-rw-r--r--cpp/src/IceGrid/ReapThread.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/cpp/src/IceGrid/ReapThread.cpp b/cpp/src/IceGrid/ReapThread.cpp
index e8ee202ac61..382d8e928fc 100644
--- a/cpp/src/IceGrid/ReapThread.cpp
+++ b/cpp/src/IceGrid/ReapThread.cpp
@@ -13,8 +13,8 @@
using namespace std;
using namespace IceGrid;
-ReapThread::ReapThread(int timeout) :
- _timeout(IceUtil::Time::seconds(timeout)),
+ReapThread::ReapThread(int wakeInterval) :
+ _wakeInterval(IceUtil::Time::seconds(wakeInterval)),
_terminated(false)
{
}
@@ -27,7 +27,7 @@ ReapThread::run()
{
{
Lock sync(*this);
- timedWait(_timeout);
+ timedWait(_wakeInterval);
if(_terminated)
{
@@ -86,20 +86,6 @@ ReapThread::terminate()
}
void
-ReapThread::add(const ReapablePtr& reapable)
-{
- Lock sync(*this);
- if(_terminated)
- {
- return;
- }
- ReapableItem item;
- item.item = reapable;
- item.timeout = _timeout;
- _sessions.push_back(item);
-}
-
-void
ReapThread::add(const ReapablePtr& reapable, int timeout)
{
Lock sync(*this);