]> feistymeow.org Git - feisty_meow.git/commitdiff
cleaned up some debug code
authorFred T. Hamster <fred@feistymeow.org>
Tue, 17 Feb 2026 12:07:47 +0000 (07:07 -0500)
committerFred T. Hamster <fred@feistymeow.org>
Tue, 17 Feb 2026 12:07:47 +0000 (07:07 -0500)
octopi/library/tests_octopus/test_bin_threaded.cpp

index 2b13b634059fd39b0c49f69f012f8dd308d5004c..d033df23c4673ee9fbc62400c639ccbe2ea201d2 100644 (file)
@@ -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.");