mongo::threadpool::ThreadPool Class Reference
#include <thread_pool.h>
List of all members.
Public Member Functions |
void | join () |
template<typename F , typename A , typename B , typename C , typename D , typename E > |
void | schedule (F f, A a, B b, C c, D d, E e) |
template<typename F , typename A , typename B , typename C , typename D > |
void | schedule (F f, A a, B b, C c, D d) |
template<typename F , typename A , typename B , typename C > |
void | schedule (F f, A a, B b, C c) |
template<typename F , typename A , typename B > |
void | schedule (F f, A a, B b) |
template<typename F , typename A > |
void | schedule (F f, A a) |
void | schedule (Task task) |
int | tasks_remaining () |
| ThreadPool (int nThreads=8) |
| ~ThreadPool () |
Private Member Functions |
void | task_done (Worker *worker) |
Private Attributes |
boost::condition | _condition |
list< Worker * > | _freeWorkers |
mongo::mutex | _mutex |
int | _nThreads |
list< Task > | _tasks |
int | _tasksRemaining |
Friends |
class | Worker |
Detailed Description
Definition at line 33 of file thread_pool.h.
Constructor & Destructor Documentation
mongo::threadpool::ThreadPool::ThreadPool |
( |
int |
nThreads = 8 |
) |
[explicit] |
mongo::threadpool::ThreadPool::~ThreadPool |
( |
|
) |
|
Member Function Documentation
void mongo::threadpool::ThreadPool::join |
( |
|
) |
|
template<typename F , typename A , typename B , typename C , typename D , typename E >
void mongo::threadpool::ThreadPool::schedule |
( |
F |
f, |
|
|
A |
a, |
|
|
B |
b, |
|
|
C |
c, |
|
|
D |
d, |
|
|
E |
e | |
|
) |
| | [inline] |
template<typename F , typename A , typename B , typename C , typename D >
void mongo::threadpool::ThreadPool::schedule |
( |
F |
f, |
|
|
A |
a, |
|
|
B |
b, |
|
|
C |
c, |
|
|
D |
d | |
|
) |
| | [inline] |
template<typename F , typename A , typename B , typename C >
void mongo::threadpool::ThreadPool::schedule |
( |
F |
f, |
|
|
A |
a, |
|
|
B |
b, |
|
|
C |
c | |
|
) |
| | [inline] |
template<typename F , typename A , typename B >
void mongo::threadpool::ThreadPool::schedule |
( |
F |
f, |
|
|
A |
a, |
|
|
B |
b | |
|
) |
| | [inline] |
template<typename F , typename A >
void mongo::threadpool::ThreadPool::schedule |
( |
F |
f, |
|
|
A |
a | |
|
) |
| | [inline] |
void mongo::threadpool::ThreadPool::schedule |
( |
Task |
task |
) |
|
void mongo::threadpool::ThreadPool::task_done |
( |
Worker * |
worker |
) |
[private] |
int mongo::threadpool::ThreadPool::tasks_remaining |
( |
|
) |
[inline] |
Friends And Related Function Documentation
friend class Worker [friend] |
Member Data Documentation
The documentation for this class was generated from the following file: