diff options
author | Matthew Newhook <matthew@zeroc.com> | 2006-11-08 07:51:22 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2006-11-08 07:51:22 +0000 |
commit | 1855b839bb9afa7d56288c4f6a4b11f6d0aeb1f4 (patch) | |
tree | f01c5a73c5075dd151c04fb106fdf46d289f9c5f /cpp/src/IceStorm/SubscriberPool.cpp | |
parent | more updates (diff) | |
download | ice-1855b839bb9afa7d56288c4f6a4b11f6d0aeb1f4.tar.bz2 ice-1855b839bb9afa7d56288c4f6a4b11f6d0aeb1f4.tar.xz ice-1855b839bb9afa7d56288c4f6a4b11f6d0aeb1f4.zip |
fix.
Diffstat (limited to 'cpp/src/IceStorm/SubscriberPool.cpp')
-rw-r--r-- | cpp/src/IceStorm/SubscriberPool.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/src/IceStorm/SubscriberPool.cpp b/cpp/src/IceStorm/SubscriberPool.cpp index 95ad447df11..db32060fa8c 100644 --- a/cpp/src/IceStorm/SubscriberPool.cpp +++ b/cpp/src/IceStorm/SubscriberPool.cpp @@ -174,9 +174,9 @@ SubscriberPool::SubscriberPool(const InstancePtr& instance) : _subscriberPoolMonitor = new SubscriberPoolMonitor(this, _timeout); for(int i = 0; i < _size; ++i) { - _workers.push_back(new SubscriberPoolWorker(this)); ++_running; ++_inUse; + _workers.push_back(new SubscriberPoolWorker(this)); } } catch(const IceUtil::Exception& ex) @@ -274,6 +274,7 @@ SubscriberPool::dequeue(const SubscriberPtr& sub) } } + assert(_inUse > 0); --_inUse; @@ -375,8 +376,8 @@ SubscriberPool::check() out << "detected stall: creating thread: load: " << _load << " threads: " << _running; } - _workers.push_back(new SubscriberPoolWorker(this)); ++_running; ++_inUse; + _workers.push_back(new SubscriberPoolWorker(this)); } } |