diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2015-03-04 10:30:44 -0500 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2015-03-05 17:35:14 -0500 |
commit | 59a9a04651486763b49ddb706a195bebccf76642 (patch) | |
tree | 335fa6d0cbc04f2c3577d2e4594e9a573f2b4594 /src/mongo/db/clientlistplugin.cpp | |
parent | ac525a4566a46b6b79a8465903b2ab0391eab506 (diff) | |
download | mongo-59a9a04651486763b49ddb706a195bebccf76642.tar.gz |
SERVER-17310 Replace boost::*_mutex::scoped_lock with boost::lock_guard.
Achieved via grep, sed and bash:
grep -Irl mutex::scoped_lock src/mongo | xargs sed -i.orig -E 's/(boost::(recursive_|timed_)?)mutex::scoped_lock/boost::lock_guard<\1mutex>/'
Then, by converting boost::lock_guard to boost::unique_lock as appropriate.
Finally, by removing unused mongo::mutex::try_lock.
Diffstat (limited to 'src/mongo/db/clientlistplugin.cpp')
-rw-r--r-- | src/mongo/db/clientlistplugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/clientlistplugin.cpp b/src/mongo/db/clientlistplugin.cpp index cf7e359d309..a8200a5c997 100644 --- a/src/mongo/db/clientlistplugin.cpp +++ b/src/mongo/db/clientlistplugin.cpp @@ -86,7 +86,7 @@ namespace { static void _processAllClients(std::stringstream& ss) { using namespace html; - boost::mutex::scoped_lock scopedLock(Client::clientsMutex); + boost::lock_guard<boost::mutex> scopedLock(Client::clientsMutex); ClientSet::const_iterator it = Client::clients.begin(); for (; it != Client::clients.end(); it++) { @@ -198,7 +198,7 @@ namespace { static BSONArray _processAllClients(MatchExpression* matcher) { BSONArrayBuilder array; - boost::mutex::scoped_lock scopedLock(Client::clientsMutex); + boost::lock_guard<boost::mutex> scopedLock(Client::clientsMutex); ClientSet::const_iterator it = Client::clients.begin(); for (; it != Client::clients.end(); it++) { |