summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libadhocutil/unittests/testResourcePool.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libadhocutil/unittests/testResourcePool.cpp b/libadhocutil/unittests/testResourcePool.cpp
index a6db002..f1b9c04 100644
--- a/libadhocutil/unittests/testResourcePool.cpp
+++ b/libadhocutil/unittests/testResourcePool.cpp
@@ -320,7 +320,10 @@ static void
acquireAndKeepFor1Second(TRPSmall * pool, AdHoc::Semaphore & s)
{
auto r = pool->get();
- BOOST_CHECK(r);
+ static std::mutex m;
+ ScopeLock(m) {
+ BOOST_CHECK(r);
+ }
s.notify();
sleep(1);
}