diff options
Diffstat (limited to 'src/mongo/db/repl/vote_requester.h')
-rw-r--r-- | src/mongo/db/repl/vote_requester.h | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/mongo/db/repl/vote_requester.h b/src/mongo/db/repl/vote_requester.h index 433facf345c..cb0be7fc888 100644 --- a/src/mongo/db/repl/vote_requester.h +++ b/src/mongo/db/repl/vote_requester.h @@ -105,26 +105,19 @@ public: * in currentConfig, in attempt to receive sufficient votes to win the election. * * evh can be used to schedule a callback when the process is complete. - * This function must be run in the executor, as it must be synchronous with the command - * callbacks that it schedules. * If this function returns Status::OK(), evh is then guaranteed to be signaled. **/ - StatusWith<ReplicationExecutor::EventHandle> start( - ReplicationExecutor* executor, - const ReplicaSetConfig& rsConfig, - long long candidateIndex, - long long term, - bool dryRun, - OpTime lastDurableOpTime, - const stdx::function<void()>& onCompletion = stdx::function<void()>()); + StatusWith<ReplicationExecutor::EventHandle> start(ReplicationExecutor* executor, + const ReplicaSetConfig& rsConfig, + long long candidateIndex, + long long term, + bool dryRun, + OpTime lastDurableOpTime); /** - * Informs the VoteRequester to cancel further processing. The "executor" - * argument must point to the same executor passed to "start()". - * - * Like start(), this method must run in the executor context. + * Informs the VoteRequester to cancel further processing. */ - void cancel(ReplicationExecutor* executor); + void cancel(); Result getResult() const; unordered_set<HostAndPort> getResponders() const; |