mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
A small change with big consequences. Allow job queue threads to moonlight as I/O threads.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/condition_variable.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
|
||||
#include "../json/value.h"
|
||||
@@ -93,14 +94,19 @@ protected:
|
||||
int mThreadCount;
|
||||
bool mShuttingDown;
|
||||
|
||||
int mIOThreadCount;
|
||||
int mMaxIOThreadCount;
|
||||
boost::asio::io_service& mIOService;
|
||||
|
||||
std::map<JobType, std::pair<int, int > > mJobCounts;
|
||||
|
||||
|
||||
void threadEntry(void);
|
||||
void threadEntry();
|
||||
void IOThread(boost::mutex::scoped_lock&);
|
||||
|
||||
public:
|
||||
|
||||
JobQueue();
|
||||
JobQueue(boost::asio::io_service&);
|
||||
|
||||
void addJob(JobType type, const std::string& name, const FUNCTION_TYPE<void(Job&)>& job);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user