0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

use host in writeback listener thread name

This commit is contained in:
Eliot Horowitz 2011-07-11 11:00:14 -04:00
parent f3600a5560
commit b25dcc742e
2 changed files with 3 additions and 1 deletions

View File

@ -40,6 +40,7 @@ namespace mongo {
mongo::mutex WriteBackListener::_seenWritebacksLock("WriteBackListener::seen");
WriteBackListener::WriteBackListener( const string& addr ) : _addr( addr ) {
_name = str::stream() << "WriteBackListener-" << addr;
log() << "creating WriteBackListener for: " << addr << endl;
}

View File

@ -64,11 +64,12 @@ namespace mongo {
protected:
WriteBackListener( const string& addr );
string name() const { return "WriteBackListener"; }
string name() const { return _name; }
void run();
private:
string _addr;
string _name;
static mongo::mutex _cacheLock; // protects _cache
static map<string,WriteBackListener*> _cache; // server to listener