Use Workers in JobQueue

This commit is contained in:
Vinnie Falco
2013-07-29 08:46:09 -07:00
parent bf9806b07f
commit ddef0ae7c7
2 changed files with 64 additions and 6 deletions

View File

@@ -4,14 +4,16 @@
*/
//==============================================================================
#ifndef RIPPLE_JOBQUEUE_H
#define RIPPLE_JOBQUEUE_H
#ifndef RIPPLE_JOBQUEUE_H_INCLUDED
#define RIPPLE_JOBQUEUE_H_INCLUDED
class JobQueue
class JobQueue : private Workers::Callback
{
public:
JobQueue ();
~JobQueue ();
// VFALCO TODO make convenience functions that allow the caller to not
// have to call bind.
//
@@ -48,6 +50,11 @@ public:
private:
void threadEntry ();
void processTask ();
private:
Workers m_workers;
boost::mutex mJobLock;
boost::condition_variable mJobCond;