Add a way for us to place jobs with a concurrency limit.

The main use case is having all threads stuck in ledgerData, fighting each other.
This commit is contained in:
JoelKatz
2013-07-13 19:02:35 -07:00
parent 2ce293ec85
commit 5b2d5e8428
6 changed files with 76 additions and 20 deletions

View File

@@ -82,7 +82,8 @@ void PeerSet::TimerEntry (boost::weak_ptr<PeerSet> wptr, const boost::system::er
ptr->setTimer ();
}
else
getApp().getJobQueue ().addJob (jtLEDGER_DATA, "timerEntry", BIND_TYPE (&PeerSet::TimerJobEntry, P_1, ptr));
getApp().getJobQueue ().addLimitJob (jtLEDGER_DATA, "timerEntry", 2,
BIND_TYPE (&PeerSet::TimerJobEntry, P_1, ptr));
}
}