Permalink
Browse files

use host in writeback listener thread name

  • Loading branch information...
erh committed Jul 11, 2011
1 parent f3600a5 commit b25dcc742ef574f2d2f0f337ed0dc509a50b4557
Showing with 3 additions and 1 deletion.
  1. +1 −0 s/writeback_listener.cpp
  2. +2 −1 s/writeback_listener.h
View
@@ -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
@@ -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

0 comments on commit b25dcc7

Please sign in to comment.