From 2bf65343ea65c3504df9cf1123b0674659d9e101 Mon Sep 17 00:00:00 2001 From: "Fred T. Hamster" Date: Tue, 17 Feb 2026 07:07:47 -0500 Subject: [PATCH] cleaned up some debug code --- .../library/tests_octopus/test_bin_threaded.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/octopi/library/tests_octopus/test_bin_threaded.cpp b/octopi/library/tests_octopus/test_bin_threaded.cpp index 2b13b634..d033df23 100644 --- a/octopi/library/tests_octopus/test_bin_threaded.cpp +++ b/octopi/library/tests_octopus/test_bin_threaded.cpp @@ -52,9 +52,6 @@ using namespace textual; using namespace timely; using namespace unit_test; -// uncomment if you want the more careful shutdown of the threads. -//#define FANCY_UNNECESSARY_THREAD_STOP ugh - // synchronization for logged messages to avoid overwriting on the console. SAFE_STATIC(mutex, __loggers_lock, ) @@ -408,16 +405,12 @@ int test_entity_data_bin_threaded::execute() __threads_can_run_wild_and_free() = false; -//deciding whether the cancel really should be done every time, to let the threads bail on their own rather than single stepping through their shutdowns. + /* we cancel all the threads first. this gives them an opportunity to know + they should shut down, and they will all go about that at their own rate. if we + just killed the list with reset first, then the amorph would dutifully shut the + threads down also, but it would do them sequentially which is way slower. */ LOG("now cancelling all threads..."); for (int j = 0; j < thread_list.elements(); j++) { thread_list[j]->cancel(); } - -#ifdef FANCY_UNNECESSARY_THREAD_STOP - //hmmm: this code shouldn't be needed! thread cabinet should do it!!!! - LOG("now stopping all threads..."); - for (int k = 0; k < thread_list.elements(); k++) { thread_list[k]->stop(); } -#endif - LOG("now resetting thread list..."); thread_list.reset(); // should whack all threads. LOG("...done exiting from all threads."); -- 2.43.0