diff options
author | Aaron <aaron@10gen.com> | 2009-05-21 18:20:07 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-05-21 18:20:07 -0400 |
commit | 80502a3fdb0ea4127b1b04a468bbe23dbb1484aa (patch) | |
tree | 1fb51fd73fb0e0a47eb4011578b5f1c1eda91389 | |
parent | 3d03daec09fb9635e8cca3cc9741224c3c8b52a2 (diff) | |
download | mongo-80502a3fdb0ea4127b1b04a468bbe23dbb1484aa.tar.gz |
never destroy log or background job mutexes, as they generated assertions on destruction in testing
-rw-r--r-- | stdafx.cpp | 2 | ||||
-rw-r--r-- | util/background.cpp | 2 | ||||
-rw-r--r-- | util/background.h | 2 | ||||
-rw-r--r-- | util/log.h | 2 | ||||
-rw-r--r-- | util/util.cpp | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/stdafx.cpp b/stdafx.cpp index cf35c210eea..aae9144b23a 100644 --- a/stdafx.cpp +++ b/stdafx.cpp @@ -134,5 +134,5 @@ namespace mongo { ss << "db version v" << versionString << ", pdfile version " << VERSION << "." << VERSION_MINOR; return ss.str(); } - + } // namespace mongo diff --git a/util/background.cpp b/util/background.cpp index 99f5733f399..4c8afacee58 100644 --- a/util/background.cpp +++ b/util/background.cpp @@ -21,7 +21,7 @@ namespace mongo { BackgroundJob *BackgroundJob::grab = 0; - boost::mutex BackgroundJob::mutex; + boost::mutex &BackgroundJob::mutex = *( new boost::mutex ); /* static */ void BackgroundJob::thr() { diff --git a/util/background.h b/util/background.h index 605f524ec15..2a772f12f34 100644 --- a/util/background.h +++ b/util/background.h @@ -64,7 +64,7 @@ namespace mongo { private: static BackgroundJob *grab; - static boost::mutex mutex; + static boost::mutex &mutex; static void thr(); volatile State state; }; diff --git a/util/log.h b/util/log.h index db1a6c37c52..96fba916ec4 100644 --- a/util/log.h +++ b/util/log.h @@ -104,7 +104,7 @@ namespace mongo { #define LOGIT { boostlock lk(mutex); cout << x; return *this; } class Logstream : public Nullstream { - static boost::mutex mutex; + static boost::mutex &mutex; public: void flush() { boostlock lk(mutex); diff --git a/util/util.cpp b/util/util.cpp index 7052d39097a..db7139639f3 100644 --- a/util/util.cpp +++ b/util/util.cpp @@ -31,7 +31,7 @@ namespace mongo { Nullstream nullstream; Logstream logstream; int logLevel = 0; - boost::mutex Logstream::mutex; + boost::mutex &Logstream::mutex = *( new boost::mutex ); bool goingAway = false; |