Commit 13e9951e authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2198] Make direct methods on Mutex private

parent f8fb9a00
......@@ -127,6 +127,7 @@ public:
/// \todo Disable in non-debug build
bool locked() const;
private:
/// \brief Lock the mutex
///
/// This method blocks until the mutex can be locked.
......
......@@ -26,24 +26,6 @@ using namespace isc::util::thread;
namespace {
TEST(MutexTest, direct) {
Mutex mutex;
EXPECT_FALSE(mutex.locked()); // Debug-only build
mutex.lock();
EXPECT_TRUE(mutex.locked()); // Debug-only build
EXPECT_FALSE(mutex.tryLock());
mutex.unlock();
EXPECT_FALSE(mutex.locked()); // Debug-only build
EXPECT_TRUE(mutex.tryLock());
mutex.unlock();
EXPECT_FALSE(mutex.locked()); // Debug-only build
}
// If we try to lock the debug mutex multiple times, it should throw.
TEST(MutexTest, lockMultiple) {
// TODO: Once we support non-debug mutexes, disable the test if we compile
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment