mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Use Workers in JobQueue
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user