mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
rs need to call client initthread
This commit is contained in:
parent
b133d42c47
commit
d6f1c1a6c7
@ -19,6 +19,7 @@
|
||||
|
||||
#include "pch.h"
|
||||
#include "rs.h"
|
||||
#include "../client.h"
|
||||
|
||||
namespace mongo {
|
||||
|
||||
@ -44,10 +45,14 @@ namespace mongo {
|
||||
}
|
||||
|
||||
Manager::Manager(ReplSetImpl *_rs) :
|
||||
task::Server("Manager"), rs(_rs), busyWithElectSelf(false), _primary(NOPRIMARY)
|
||||
task::Server("rs Manager"), rs(_rs), busyWithElectSelf(false), _primary(NOPRIMARY)
|
||||
{
|
||||
}
|
||||
|
||||
void Manager::starting() {
|
||||
Client::initThread("rs Manager");
|
||||
}
|
||||
|
||||
void Manager::noteARemoteIsPrimary(const Member *m) {
|
||||
rs->_currentPrimary = m;
|
||||
rs->_self->lhb() = "";
|
||||
|
@ -41,6 +41,11 @@ namespace mongo {
|
||||
/** send message but block until function completes */
|
||||
void call(const lam&);
|
||||
|
||||
protected:
|
||||
/* this needn't be abstract; i left it that way for now so i remember
|
||||
to call Client::initThread() when using in mongo... */
|
||||
virtual void starting() = 0;
|
||||
|
||||
private:
|
||||
virtual bool initClient() { return true; }
|
||||
virtual string name() { return _name; }
|
||||
|
Loading…
Reference in New Issue
Block a user