git://git.novaco.in
/
novacoin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Use scoped locks instead of CRITICAL_BLOCK
[novacoin.git]
/
src
/
test
/
util_tests.cpp
diff --git
a/src/test/util_tests.cpp
b/src/test/util_tests.cpp
index
94c0c77
..
db31f49
100644
(file)
--- 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!");