Browse Source

Merge #8016: Fix multithread CScheduler and reenable test

166e4b0 Notify other serviceQueue thread we are finished to prevent deadlocks. (Pavel Janík)
db18ab2 Reenable multithread scheduler test. (Pavel Janík)
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
5767e80dda
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 1
      src/scheduler.cpp
  2. 2
      src/test/scheduler_tests.cpp

1
src/scheduler.cpp

@ -79,6 +79,7 @@ void CScheduler::serviceQueue() @@ -79,6 +79,7 @@ void CScheduler::serviceQueue()
}
}
--nThreadsServicingQueue;
newTaskScheduled.notify_one();
}
void CScheduler::stop(bool drain)

2
src/test/scheduler_tests.cpp

@ -40,7 +40,6 @@ static void MicroSleep(uint64_t n) @@ -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);
@ -116,6 +115,5 @@ BOOST_AUTO_TEST_CASE(manythreads) @@ -116,6 +115,5 @@ BOOST_AUTO_TEST_CASE(manythreads)
}
BOOST_CHECK_EQUAL(counterSum, 200);
}
#endif
BOOST_AUTO_TEST_SUITE_END()

Loading…
Cancel
Save