diff options
| author | Pieter Wuille <[email protected]> | 2012-04-09 13:25:17 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2012-04-09 13:25:17 -0700 |
| commit | 1a275bac2b5454ae9d6744f28c29cbf40e2fbf13 (patch) | |
| tree | 4cf7a1b4001ef82c15f4942f6a495aaf530c7d0e /src/test/util_tests.cpp | |
| parent | Merge branch 'filesystem' of https://github.com/Diapolo/bitcoin (diff) | |
| parent | Do not report spurious deadlocks caused by TRY_LOCK (diff) | |
| download | discoin-1a275bac2b5454ae9d6744f28c29cbf40e2fbf13.tar.xz discoin-1a275bac2b5454ae9d6744f28c29cbf40e2fbf13.zip | |
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.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 94c0c77a4..db31f4988 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!"); |