+
+ if (bFail) {
+ wxCommandEvent eventFail (wxEVT_COMMAND_MENU_SELECTED, BackgroundSupervisor::MSG_WORKER_THREAD_FAIL);
+ eventFail.SetInt (m_iThread); // Send back thread# that has finished
+ eventFail.SetString (failMsg);
+ wxPostEvent (m_pSupervisor, eventFail);
+ } else {
+ wxCommandEvent eventDone (wxEVT_COMMAND_MENU_SELECTED, BackgroundSupervisor::MSG_WORKER_THREAD_DONE);
+ eventDone.SetInt (m_iThread); // Send back thread# that has finished
+ wxPostEvent (m_pSupervisor, eventDone);
+ }
+
+ while (! TestDestroy())
+ Sleep(100);
+