| Qore Programming Language Reference Manual 1.0.8

QC_ThreadPool.dox.h
1 namespace Qore {
4 namespace Thread {
6
43 class ThreadPool {
44
45 public:
47
61 constructor(int max = 0, int minidle = 0, int maxidle = 0, timeout release_ms = 5s);
62
63 public:
65
70 destructor();
71
72 public:
74
88 stop();
89
90 public:
92
102 stopWait();
103
104 public:
106
114 submit(code task, *code cancel);
115
116 public:
118
128 string toString();
129 };
130 }
131 }
Qore::Thread::ThreadPool::constructor
constructor(int max=0, int minidle=0, int maxidle=0, timeout release_ms=5s)
creates the pool with the given parameters; idle worker threads are started immediately if necessary ...
Qore::Thread::ThreadPool
This class defines a thread pool that grows and shrinks dynamically within user-defined limits accord...
Definition: QC_ThreadPool.dox.h:43
Qore::max
auto max(list< auto > l)
Returns the maximum value in a list.
Qore::Thread::ThreadPool::destructor
destructor()
destroys the pool; any worker threads are detached and pending tasks not yet executed are canceled; t...
Qore::Thread::ThreadPool::stop
stop()
stops the thread pool and returns immediately; queued tasks are canceled
Qore::Thread::ThreadPool::stopWait
stopWait()
stops the thread pool and does not return until all submitted tasks have been executed and all worker...
Qore::Thread::ThreadPool::submit
submit(code task, *code cancel)
submit a task to the pool
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
Qore::Thread::ThreadPool::toString
string toString()
returns a description of the ThreadPool