+ wxMutexLocker lock(*gs_mutexAllThreads);
+
+ // terminate any threads left
+ count = gs_allThreads.GetCount();
+ if ( count != 0u )
+ {
+ wxLogDebug(wxT("%lu threads were not terminated by the application."),
+ (unsigned long)count);
+ }
+ } // unlock mutex before deleting the threads as they lock it in their dtor