Merge #10521: Limit variable scope

90593ed92 Limit variable scope (practicalswift)

Tree-SHA512: 4719e303688a31aefbe1d239e86b21dd3c2045524e08bd628c6ba0c6c2a97de14d04305b9beafe0b1dcde7229793e6663168953f192e88ed409be5c30fd2a9a9
This commit is contained in:
Pieter Wuille
2017-06-09 12:58:02 -07:00
11 changed files with 21 additions and 23 deletions

View File

@@ -402,12 +402,12 @@ BOOST_AUTO_TEST_CASE(test_CheckQueueControl_Locks)
{
boost::thread_group tg;
std::mutex m;
bool has_lock {false};
bool has_tried {false};
bool done {false};
bool done_ack {false};
std::condition_variable cv;
{
bool has_lock {false};
bool has_tried {false};
bool done {false};
bool done_ack {false};
std::unique_lock<std::mutex> l(m);
tg.create_thread([&]{
CCheckQueueControl<FakeCheck> control(queue.get());