mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Merge #19090: refactor: Misc scheduler cleanups
fa8337fcdbclang-format scheduler (MarcoFalke)fa3d41b5abdoc: Switch scheduler to doxygen comments (MarcoFalke)fac43f9889scheduler: Replace stop(true) with StopWhenDrained() (MarcoFalke)fa9cca0550doc: Remove unused documentation about unimplemented features (MarcoFalke)fab2950d70doc: Switch boost::thread to std::thread in scheduler (MarcoFalke)fa9819695atest: Remove unused scheduler.h include from the common setup (MarcoFalke)fa609c4f76scheduler: Remove unused REVERSE_LOCK (MarcoFalke) Pull request description: This accumulates a bunch of cleanup that was long overdue, but I haven't yet gotten around to address. Specifically, but not limited to: * Remove unused code, documentation and includes * Upgrade to doxygen documentation Please refer to the individual commits for more details. ACKs for top commit: jnewbery: utACKfa8337fcdbTree-SHA512: 0c825ad9767e2697a3ef1ec1be13fdc2b18eeb7493ad0be5b65cc9f209391e78b17ee66e35e094c5e171c12b0f1624f287a110f6bddaf3024b708877afa8552e
This commit is contained in:
@@ -89,7 +89,7 @@ BOOST_AUTO_TEST_CASE(manythreads)
|
||||
}
|
||||
|
||||
// Drain the task queue then exit threads
|
||||
microTasks.stop(true);
|
||||
microTasks.StopWhenDrained();
|
||||
microThreads.join_all(); // ... wait until all the threads are done
|
||||
|
||||
int counterSum = 0;
|
||||
@@ -155,7 +155,7 @@ BOOST_AUTO_TEST_CASE(singlethreadedscheduler_ordered)
|
||||
}
|
||||
|
||||
// finish up
|
||||
scheduler.stop(true);
|
||||
scheduler.StopWhenDrained();
|
||||
threads.join_all();
|
||||
|
||||
BOOST_CHECK_EQUAL(counter1, 100);
|
||||
@@ -186,7 +186,7 @@ BOOST_AUTO_TEST_CASE(mockforward)
|
||||
scheduler.MockForward(std::chrono::minutes{5});
|
||||
|
||||
// ensure scheduler has chance to process all tasks queued for before 1 ms from now.
|
||||
scheduler.scheduleFromNow([&scheduler] { scheduler.stop(false); }, std::chrono::milliseconds{1});
|
||||
scheduler.scheduleFromNow([&scheduler] { scheduler.stop(); }, std::chrono::milliseconds{1});
|
||||
scheduler_thread.join();
|
||||
|
||||
// check that the queue only has one job remaining
|
||||
|
||||
Reference in New Issue
Block a user