diff options
author | Matthew Newhook <matthew@zeroc.com> | 2006-09-04 07:16:49 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2006-09-04 07:16:49 +0000 |
commit | f99970bd52104537bed20ed7c7211f90899a27ca (patch) | |
tree | 12a6d3c6187c69b2eec1df81c65863f83111227f /cpp/src/IceGrid/ReapThread.cpp | |
parent | http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1331 (diff) | |
download | ice-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.cpp | 20 |
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); |