aboutsummaryrefslogtreecommitdiff
path: root/src/test/util_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-04-09 13:25:17 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2012-04-09 13:25:17 -0700
commit1a275bac2b5454ae9d6744f28c29cbf40e2fbf13 (patch)
tree4cf7a1b4001ef82c15f4942f6a495aaf530c7d0e /src/test/util_tests.cpp
parent1044391135b9d2e309c1e960afc72afa2a7e04f5 (diff)
parentf342dac1cb06d5b0d264fa59e448ef6477ec5b6b (diff)
Merge pull request #1052 from sipa/scopedlocks
Use scoped locks instead of CRITICAL_BLOCK
Diffstat (limited to 'src/test/util_tests.cpp')
-rw-r--r--src/test/util_tests.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 94c0c77a44..db31f4988a 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -15,14 +15,15 @@ BOOST_AUTO_TEST_CASE(util_criticalsection)
CCriticalSection cs;
do {
- CRITICAL_BLOCK(cs)
- break;
+ LOCK(cs);
+ break;
BOOST_ERROR("break was swallowed!");
} while(0);
do {
- TRY_CRITICAL_BLOCK(cs)
+ TRY_LOCK(cs, lockTest);
+ if (lockTest)
break;
BOOST_ERROR("break was swallowed!");