Skip to content

Commit 280d0bd

Browse files
author
MarcoFalke
committed
Merge #21010: refactor: remove straggling boost::mutex usage
f827e15 refactor: remove straggling boost::mutex usage (fanquake) Pull request description: After the merge of #18710, the linter is warning: ```bash A new Boost dependency in the form of "boost/thread/mutex.hpp" appears to have been introduced: src/sync.cpp:#include <boost/thread/mutex.hpp> src/test/sync_tests.cpp:#include <boost/thread/mutex.hpp> ^---- failure generated from test/lint/lint-includes.sh ``` #18710 removed `boost/thread/mutex.hpp` from lint-includes, however in the interim #19337 was merged, which introduced more `boost::mutex` usage. Given we no longer use `boost::mutex`, just remove the double lock test and remaining includes. ACKs for top commit: laanwj: Code review ACK f827e15 hebasto: ACK f827e15 Tree-SHA512: f738b12189fe5b39db3e8f8231e9002714413a962eaf98adc84a6614fa474df5616358cfb1c89b92a2b0564efa9b704a774c49d4a25dca18a0ccc3cd9eabfc0a
2 parents 16ae336 + f827e15 commit 280d0bd

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

src/sync.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
#include <util/strencodings.h>
1414
#include <util/threadnames.h>
1515

16-
#include <boost/thread/mutex.hpp>
17-
1816
#include <map>
1917
#include <mutex>
2018
#include <set>
@@ -224,7 +222,6 @@ template void EnterCritical(const char*, const char*, int, Mutex*, bool);
224222
template void EnterCritical(const char*, const char*, int, RecursiveMutex*, bool);
225223
template void EnterCritical(const char*, const char*, int, std::mutex*, bool);
226224
template void EnterCritical(const char*, const char*, int, std::recursive_mutex*, bool);
227-
template void EnterCritical(const char*, const char*, int, boost::mutex*, bool);
228225

229226
void CheckLastCritical(void* cs, std::string& lockname, const char* guardname, const char* file, int line)
230227
{

src/test/sync_tests.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <test/util/setup_common.h>
77

88
#include <boost/test/unit_test.hpp>
9-
#include <boost/thread/mutex.hpp>
109

1110
#include <mutex>
1211

@@ -110,11 +109,6 @@ BOOST_AUTO_TEST_CASE(double_lock_mutex)
110109
TestDoubleLock<Mutex>(true /* should throw */);
111110
}
112111

113-
BOOST_AUTO_TEST_CASE(double_lock_boost_mutex)
114-
{
115-
TestDoubleLock<boost::mutex>(true /* should throw */);
116-
}
117-
118112
BOOST_AUTO_TEST_CASE(double_lock_recursive_mutex)
119113
{
120114
TestDoubleLock<RecursiveMutex>(false /* should not throw */);

0 commit comments

Comments
 (0)