Skip to content

Commit

Permalink
Merge bitcoin#8016: Fix multithread CScheduler and reenable test
Browse files Browse the repository at this point in the history
166e4b0 Notify other serviceQueue thread we are finished to prevent deadlocks. (Pavel Janík)
db18ab2 Reenable multithread scheduler test. (Pavel Janík)
  • Loading branch information
laanwj committed May 10, 2016
2 parents b33824b + 166e4b0 commit 5767e80
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions src/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ void CScheduler::serviceQueue()
}
}
--nThreadsServicingQueue;
newTaskScheduled.notify_one();
}

void CScheduler::stop(bool drain)
Expand Down
2 changes: 0 additions & 2 deletions src/test/scheduler_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ static void MicroSleep(uint64_t n)
#endif
}

#if 0 /* Disabled for now because there is a race condition issue in this test - see #6540 */
BOOST_AUTO_TEST_CASE(manythreads)
{
seed_insecure_rand(false);
Expand Down Expand Up @@ -116,6 +115,5 @@ BOOST_AUTO_TEST_CASE(manythreads)
}
BOOST_CHECK_EQUAL(counterSum, 200);
}
#endif

BOOST_AUTO_TEST_SUITE_END()

0 comments on commit 5767e80

Please sign in to comment.