mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 21:45:52 +00:00
Except when interacting with boost, use std::function and std::bind
when C++11 is available. See: http://stackoverflow.com/questions/14617835
This commit is contained in:
@@ -97,7 +97,7 @@ bool Job::operator<=(const Job& j) const
|
||||
return mJobIndex <= j.mJobIndex;
|
||||
}
|
||||
|
||||
void JobQueue::addJob(JobType type, const std::string& name, const boost::function<void(Job&)>& jobFunc)
|
||||
void JobQueue::addJob(JobType type, const std::string& name, const FUNCTION_TYPE<void(Job&)>& jobFunc)
|
||||
{
|
||||
assert(type != jtINVALID);
|
||||
|
||||
@@ -246,7 +246,7 @@ void JobQueue::setThreadCount(int c)
|
||||
while (mThreadCount < c)
|
||||
{
|
||||
++mThreadCount;
|
||||
boost::thread(boost::bind(&JobQueue::threadEntry, this)).detach();
|
||||
boost::thread(BIND_TYPE(&JobQueue::threadEntry, this)).detach();
|
||||
}
|
||||
while (mThreadCount > c)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user