mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-14 15:05:35 +02:00
- POCO_THREAD_STACK_SIZE macro
- few Thread modifications - ThreadPool configurable stack size
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user