Feature Selection ToolboxFST3 Library / Documentation

FST::ThreadPool< max_threads > Class Template Reference

Implements thread scheduler that assigns jobs up to maximum number of threads allowed. More...

#include <thread_pool.hpp>

Collaboration diagram for FST::ThreadPool< max_threads >:

List of all members.

Classes

struct  ThreadsArray
 Structure to keep status of threads in the pool. More...

Public Member Functions

unsigned int go (const boost::function0< void > &threadfunc)
void join_all ()
unsigned int get_running_threads () const

Private Types

typedef boost::scoped_ptr
< boost::thread > 
ThreadPtr

Private Member Functions

void launch_thread (const boost::function0< void > &threadfunc, unsigned int threadsid)

Private Attributes

ThreadsArray threads [max_threads]
unsigned int _running_threads
boost::mutex mutex_launcher
boost::condition cond_launcher

Static Private Attributes

static unsigned int idx = 0

Detailed Description

template<unsigned int max_threads = 2>
class FST::ThreadPool< max_threads >

Implements thread scheduler that assigns jobs up to maximum number of threads allowed.


The documentation for this class was generated from the following file:

Generated on Thu Mar 31 11:38:14 2011 for FST3Library by  doxygen 1.6.1