diff options
author | Marc Laukien <marc@zeroc.com> | 2003-03-13 19:53:21 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2003-03-13 19:53:21 +0000 |
commit | d774349054e09a717a92f95391dd663f1ba8b29b (patch) | |
tree | d2784c92c78aef72806add1b9c87ab5e1259f32d /cpp/src/Ice/ThreadPool.h | |
parent | started with shrinking pool (diff) | |
download | ice-d774349054e09a717a92f95391dd663f1ba8b29b.tar.bz2 ice-d774349054e09a717a92f95391dd663f1ba8b29b.tar.xz ice-d774349054e09a717a92f95391dd663f1ba8b29b.zip |
started with shrinking pool; inlined ops in IceUtil::Time
Diffstat (limited to 'cpp/src/Ice/ThreadPool.h')
-rw-r--r-- | cpp/src/Ice/ThreadPool.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h index 26df7f14ee5..d4fdea8b10e 100644 --- a/cpp/src/Ice/ThreadPool.h +++ b/cpp/src/Ice/ThreadPool.h @@ -17,6 +17,7 @@ #include <IceUtil/Shared.h> #include <IceUtil/Mutex.h> +#include <IceUtil/Monitor.h> #include <IceUtil/Thread.h> #include <Ice/ThreadPoolF.h> @@ -62,12 +63,6 @@ private: bool _destroyed; const std::string _prefix; - const int _size; // Number of threads that are pre-created. - const int _sizeMax; // Maximum number of threads. - const int _sizeWarn; // If _inUse reaches _sizeWarn, a "low on threads" warning will be printed. - int _inUse; // Number of threads that are currently in use. - IceUtil::Mutex _inUseMutex; - SOCKET _maxFd; SOCKET _minFd; SOCKET _lastFd; @@ -81,8 +76,6 @@ private: int _timeout; - IceUtil::Mutex _threadMutex; - class EventHandlerThread : public IceUtil::Thread { public: @@ -97,6 +90,13 @@ private: friend class EventHandlerThread; std::vector<IceUtil::ThreadControl> _threads; // Control for all threads, running or not. + const int _size; // Number of threads that are pre-created. + const int _sizeMax; // Maximum number of threads. + const int _sizeWarn; // If _inUse reaches _sizeWarn, a "low on threads" warning will be printed. + int _inUse; // Number of threads that are currently in use. + double _load; // Current load in number of threads. + + IceUtil::Mutex _promoteMutex; }; } |