refactor: remove straggling boost::mutex usage

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
```

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.
pull/826/head
fanquake 4 years ago
parent 16ae3368f2
commit f827e151a2
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

@ -13,8 +13,6 @@
#include <util/strencodings.h> #include <util/strencodings.h>
#include <util/threadnames.h> #include <util/threadnames.h>
#include <boost/thread/mutex.hpp>
#include <map> #include <map>
#include <mutex> #include <mutex>
#include <set> #include <set>
@ -224,7 +222,6 @@ template void EnterCritical(const char*, const char*, int, Mutex*, bool);
template void EnterCritical(const char*, const char*, int, RecursiveMutex*, bool); template void EnterCritical(const char*, const char*, int, RecursiveMutex*, bool);
template void EnterCritical(const char*, const char*, int, std::mutex*, bool); template void EnterCritical(const char*, const char*, int, std::mutex*, bool);
template void EnterCritical(const char*, const char*, int, std::recursive_mutex*, bool); template void EnterCritical(const char*, const char*, int, std::recursive_mutex*, bool);
template void EnterCritical(const char*, const char*, int, boost::mutex*, bool);
void CheckLastCritical(void* cs, std::string& lockname, const char* guardname, const char* file, int line) void CheckLastCritical(void* cs, std::string& lockname, const char* guardname, const char* file, int line)
{ {

@ -6,7 +6,6 @@
#include <test/util/setup_common.h> #include <test/util/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <boost/thread/mutex.hpp>
#include <mutex> #include <mutex>
@ -110,11 +109,6 @@ BOOST_AUTO_TEST_CASE(double_lock_mutex)
TestDoubleLock<Mutex>(true /* should throw */); TestDoubleLock<Mutex>(true /* should throw */);
} }
BOOST_AUTO_TEST_CASE(double_lock_boost_mutex)
{
TestDoubleLock<boost::mutex>(true /* should throw */);
}
BOOST_AUTO_TEST_CASE(double_lock_recursive_mutex) BOOST_AUTO_TEST_CASE(double_lock_recursive_mutex)
{ {
TestDoubleLock<RecursiveMutex>(false /* should not throw */); TestDoubleLock<RecursiveMutex>(false /* should not throw */);

Loading…
Cancel
Save