added stack size argument to ThreadPool constructor

This commit is contained in:
Aleksandar Fabijanic
2008-04-21 23:29:13 +00:00
parent 9fd70bade2
commit 621c98d358
2 changed files with 22 additions and 7 deletions

View File

@@ -69,14 +69,21 @@ class Foundation_API ThreadPool
/// from the pool.
{
public:
ThreadPool(int minCapacity = 2, int maxCapacity = 16, int idleTime = 60);
ThreadPool(const std::string& name, int minCapacity = 2, int maxCapacity = 16, int idleTime = 60);
ThreadPool(int minCapacity = 2,
int maxCapacity = 16,
int idleTime = 60,
int stackSize = POCO_THREAD_STACK_SIZE);
ThreadPool(const std::string& name,
int minCapacity = 2,
int maxCapacity = 16,
int idleTime = 60,
int stackSize = POCO_THREAD_STACK_SIZE);
/// Creates a thread pool with minCapacity threads.
/// If required, up to maxCapacity threads are created
/// a NoThreadAvailableException exception is thrown.
/// If a thread is running idle for more than idleTime seconds,
/// and more than minCapacity threads are running, the thread
/// is killed.
/// is killed. Threads are created with given stack size.
~ThreadPool();
/// Currently running threads will remain active