diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2017-12-06 14:40:59 -0500 |
---|---|---|
committer | Billy Donahue <billy.donahue@mongodb.com> | 2017-12-14 17:50:41 -0500 |
commit | 950fa6e6fd8f46248796dea3bc6c2392757b163d (patch) | |
tree | 2556f9322ee634477fc54b6876653b8ea702b8fa /src/mongo/db/repl/reporter.cpp | |
parent | d2eedbeeedb61753c17b6a87912e4b14e7611b95 (diff) | |
download | mongo-950fa6e6fd8f46248796dea3bc6c2392757b163d.tar.gz |
SERVER-32070 migrate some easy stdx::bind to lambdas (pt3)
Diffstat (limited to 'src/mongo/db/repl/reporter.cpp')
-rw-r--r-- | src/mongo/db/repl/reporter.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/mongo/db/repl/reporter.cpp b/src/mongo/db/repl/reporter.cpp index b1fe3d50e36..edddf76ade0 100644 --- a/src/mongo/db/repl/reporter.cpp +++ b/src/mongo/db/repl/reporter.cpp @@ -170,8 +170,10 @@ Status Reporter::trigger() { return Status::OK(); } - auto scheduleResult = _executor->scheduleWork( - stdx::bind(&Reporter::_prepareAndSendCommandCallback, this, stdx::placeholders::_1, true)); + auto scheduleResult = + _executor->scheduleWork([=](const executor::TaskExecutor::CallbackArgs& args) { + _prepareAndSendCommandCallback(args, true); + }); _status = scheduleResult.getStatus(); if (!_status.isOK()) { @@ -212,7 +214,9 @@ void Reporter::_sendCommand_inlock(BSONObj commandRequest) { auto scheduleResult = _executor->scheduleRemoteCommand( executor::RemoteCommandRequest(_target, "admin", commandRequest, nullptr), - stdx::bind(&Reporter::_processResponseCallback, this, stdx::placeholders::_1)); + [this](const executor::TaskExecutor::RemoteCommandCallbackArgs& rcbd) { + _processResponseCallback(rcbd); + }); _status = scheduleResult.getStatus(); if (!_status.isOK()) { @@ -268,13 +272,10 @@ void Reporter::_processResponseCallback( // triggered. auto when = _executor->now() + _keepAliveInterval; bool fromTrigger = false; - auto scheduleResult = - _executor->scheduleWorkAt(when, - stdx::bind(&Reporter::_prepareAndSendCommandCallback, - this, - stdx::placeholders::_1, - fromTrigger)); - + auto scheduleResult = _executor->scheduleWorkAt( + when, [=](const executor::TaskExecutor::CallbackArgs& args) { + _prepareAndSendCommandCallback(args, fromTrigger); + }); _status = scheduleResult.getStatus(); if (!_status.isOK()) { _onShutdown_inlock(); |