DubiousEngine  0.2.0
Simple Game Engine
Dubious::Utility::Thread_pool Class Reference

Simple thread pool. More...

#include <Thread_pool.h>

Public Types

typedef std::function< void()> Func
 

Public Member Functions

 Thread_pool (const int pool_size)
 
 ~Thread_pool ()
 
void push (Func f)
 
int size () const
 

Detailed Description

Simple thread pool.

This is a simple queue of work and a pool of threads to do the work. It's not terribly sophisticated, and it actually may not work correctly as it's not in use at the moment. I am playing with threading and C++11 async, so this might go away.

DO NOT USE Unless appropriately tested, debugged, etc

Member Typedef Documentation

typedef std::function<void()> Dubious::Utility::Thread_pool::Func

Constructor & Destructor Documentation

Dubious::Utility::Thread_pool::Thread_pool ( const int  pool_size)
Dubious::Utility::Thread_pool::~Thread_pool ( )

Member Function Documentation

void Dubious::Utility::Thread_pool::push ( Func  f)
int Dubious::Utility::Thread_pool::size ( ) const

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