mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove unnecessary allocation/deallocation from masterLock
* Add make_lock. * Rename Application::LockType to Application::MutexType: * Rename getMasterLock to getMasterMutex. * Use getMasterMutex and make_lock. * Remove unused code.
This commit is contained in:
committed by
Tom Ritchford
parent
698fe73608
commit
a61ffab3f9
@@ -60,6 +60,7 @@
|
||||
#include <beast/module/core/thread/DeadlineTimer.h>
|
||||
#include <beast/module/core/system/SystemStats.h>
|
||||
#include <beast/cxx14/memory.h> // <memory>
|
||||
#include <beast/utility/make_lock.h>
|
||||
#include <boost/optional.hpp>
|
||||
#include <tuple>
|
||||
|
||||
@@ -652,7 +653,7 @@ void NetworkOPsImp::onDeadlineTimer (beast::DeadlineTimer& timer)
|
||||
void NetworkOPsImp::processHeartbeatTimer ()
|
||||
{
|
||||
{
|
||||
auto lock = getApp().masterLock();
|
||||
auto lock = beast::make_lock(getApp().getMasterMutex());
|
||||
|
||||
// VFALCO NOTE This is for diagnosing a crash on exit
|
||||
Application& app (getApp ());
|
||||
@@ -1004,7 +1005,7 @@ Transaction::pointer NetworkOPsImp::processTransactionCb (
|
||||
}
|
||||
|
||||
{
|
||||
auto lock = getApp().masterLock();
|
||||
auto lock = beast::make_lock(getApp().getMasterMutex());
|
||||
|
||||
bool didApply;
|
||||
TER r = m_ledgerMaster.doTransaction (
|
||||
@@ -1600,7 +1601,7 @@ void NetworkOPsImp::processTrustedProposal (
|
||||
uint256 checkLedger, bool sigGood)
|
||||
{
|
||||
{
|
||||
auto lock = getApp().masterLock();
|
||||
auto lock = beast::make_lock(getApp().getMasterMutex());
|
||||
|
||||
bool relay = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user