- POCO_THREAD_STACK_SIZE macro

- few Thread modifications
- ThreadPool configurable stack size
This commit is contained in:
Aleksandar Fabijanic
2008-04-20 23:28:41 +00:00
parent 537ec8aca3
commit 9fd70bade2
11 changed files with 90 additions and 40 deletions

View File

@@ -89,6 +89,13 @@ public:
int capacity() const;
/// Returns the maximum capacity of threads.
void setStackSize(int stackSize);
/// Sets the stack size for threads.
/// New stack size applies only for newly created threads.
int getStackSize() const;
/// Returns the stack size used to create new threads.
int used() const;
/// Returns the number of currently used threads.
@@ -159,11 +166,26 @@ private:
int _idleTime;
int _serial;
int _age;
int _stackSize;
ThreadVec _threads;
mutable FastMutex _mutex;
};
// inlines
inline void ThreadPool::setStackSize(int stackSize)
{
_stackSize = stackSize;
}
inline int ThreadPool::getStackSize() const
{
return _stackSize;
}
} // namespace Poco