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,
a,
b,
c,
d,
e 
) [inline]

Definition at line 60 of file thread_pool.h.

template<typename F , typename A , typename B , typename C , typename D >
void mongo::threadpool::ThreadPool::schedule ( f,
a,
b,
c,
d 
) [inline]

Definition at line 58 of file thread_pool.h.

template<typename F , typename A , typename B , typename C >
void mongo::threadpool::ThreadPool::schedule ( f,
a,
b,
c 
) [inline]

Definition at line 56 of file thread_pool.h.

template<typename F , typename A , typename B >
void mongo::threadpool::ThreadPool::schedule ( f,
a,
b 
) [inline]

Definition at line 54 of file thread_pool.h.

template<typename F , typename A >
void mongo::threadpool::ThreadPool::schedule ( f,
a 
) [inline]

Definition at line 52 of file thread_pool.h.

void mongo::threadpool::ThreadPool::schedule ( Task  task  ) 
void mongo::threadpool::ThreadPool::task_done ( Worker *  worker  )  [private]
int mongo::threadpool::ThreadPool::tasks_remaining (  )  [inline]

Definition at line 62 of file thread_pool.h.


Friends And Related Function Documentation

friend class Worker [friend]

Definition at line 75 of file thread_pool.h.


Member Data Documentation

boost::condition mongo::threadpool::ThreadPool::_condition [private]

Definition at line 66 of file thread_pool.h.

Definition at line 68 of file thread_pool.h.

Definition at line 65 of file thread_pool.h.

Definition at line 71 of file thread_pool.h.

Definition at line 69 of file thread_pool.h.

Definition at line 70 of file thread_pool.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:59 2013