Qore Programming Language Reference Manual  0.8.9
 All Classes Namespaces Functions Variables Groups Pages
QC_ThreadPool.dox.h
1 namespace Qore::Thread {
4 
41 class ThreadPool {
42 
43 public:
45 
59  constructor(int max = 0, int minidle = 0, int maxidle = 0, timeout release_ms = 5s);
60 
61 public:
63 
68  destructor();
69 
70 public:
72 
83  stop();
84 
85 public:
87 
96  stopWait();
97 
98 public:
100 
108  submit(code task, *code cancel);
109 
110 public:
112 
122 string toString();
123 };
124 };
any max(list l)
Returns the maximum value in a list.
constructor(int max=0, int minidle=0, int maxidle=0, timeout release_ms=5s)
creates the pool with the given parameters; idle threads are started immediately if necessary ...
This class defines a thread pool that grows and shrinks dynamically within user-defined limits accord...
Definition: QC_ThreadPool.dox.h:41
destructor()
destroys the pool; any task threads are detached; to wait for all task threads to complete...
stop()
stops the thread pool and returns immediately; after this method has been executed once no more tasks...
stopWait()
stops the thread pool and does not return until all child threads have also been stopped; after this ...
submit(code task, *code cancel)
submit a task to the pool
string toString()
returns a description of the ThreadPool