From b25dcc742ef574f2d2f0f337ed0dc509a50b4557 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Mon, 11 Jul 2011 11:00:14 -0400 Subject: [PATCH] use host in writeback listener thread name --- s/writeback_listener.cpp | 1 + s/writeback_listener.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/s/writeback_listener.cpp b/s/writeback_listener.cpp index 7e872c24e18..d70366312fc 100644 --- a/s/writeback_listener.cpp +++ b/s/writeback_listener.cpp @@ -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; } diff --git a/s/writeback_listener.h b/s/writeback_listener.h index 8fc891d3dab..1ef33dab1ec 100644 --- a/s/writeback_listener.h +++ b/s/writeback_listener.h @@ -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 _cache; // server to listener