mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
use host in writeback listener thread name
This commit is contained in:
parent
f3600a5560
commit
b25dcc742e
@ -40,6 +40,7 @@ namespace mongo {
|
|||||||
mongo::mutex WriteBackListener::_seenWritebacksLock("WriteBackListener::seen");
|
mongo::mutex WriteBackListener::_seenWritebacksLock("WriteBackListener::seen");
|
||||||
|
|
||||||
WriteBackListener::WriteBackListener( const string& addr ) : _addr( addr ) {
|
WriteBackListener::WriteBackListener( const string& addr ) : _addr( addr ) {
|
||||||
|
_name = str::stream() << "WriteBackListener-" << addr;
|
||||||
log() << "creating WriteBackListener for: " << addr << endl;
|
log() << "creating WriteBackListener for: " << addr << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,11 +64,12 @@ namespace mongo {
|
|||||||
protected:
|
protected:
|
||||||
WriteBackListener( const string& addr );
|
WriteBackListener( const string& addr );
|
||||||
|
|
||||||
string name() const { return "WriteBackListener"; }
|
string name() const { return _name; }
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
string _addr;
|
string _addr;
|
||||||
|
string _name;
|
||||||
|
|
||||||
static mongo::mutex _cacheLock; // protects _cache
|
static mongo::mutex _cacheLock; // protects _cache
|
||||||
static map<string,WriteBackListener*> _cache; // server to listener
|
static map<string,WriteBackListener*> _cache; // server to listener
|
||||||
|
Loading…
Reference in New Issue
Block a user