diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-04-06 18:39:12 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-04-09 01:59:46 +0200 |
commit | f8dcd5ca6f55ad49807cf7491c1f153f6158400e (patch) | |
tree | 6049e300099aa5f509e408acfff0236367b4a26e /src/test/util_tests.cpp | |
parent | 138d08c5315c45b3dd08184c4eeb77ee3e47ef0a (diff) |
Use scoped locks instead of CRITICAL_BLOCK
Diffstat (limited to 'src/test/util_tests.cpp')
-rw-r--r-- | src/test/util_tests.cpp | 7 |
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!"); |