r579: no message
[ctsim.git] / src / threadrecon.cpp
index 7a7b3ddb1c33f530bcd2a348851f8dd44f882fa1..820b44b75d70e2382e65a122c10d47e1ba53da49 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadrecon.cpp,v 1.8 2001/02/25 06:32:12 kevin Exp $
+**  $Id: threadrecon.cpp,v 1.9 2001/02/25 07:36:26 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -86,7 +86,7 @@ ReconstructorSupervisorThread::Entry()
 
   while (reconSupervisor.anyWorkersRunning()) {
     Sleep(50);
-    Yield();
+    reconSupervisor.ProcessPendingEvents ();
   }
 
   return reinterpret_cast<wxThread::ExitCode>(0);
@@ -254,14 +254,14 @@ ReconstructorWorker::Entry ()
       return reinterpret_cast<wxThread::ExitCode>(-1);
     }
     pReconstructor->reconstructView (iUnit + m_iStartUnit, 1);
-    wxPostEvent (m_pSupervisor, eventProgress);
+    m_pSupervisor->AddPendingEvent (eventProgress);
   }
   pReconstructor->postProcessing();
-  
-  wxPostEvent (m_pSupervisor, eventDone);
-  
   delete pReconstructor;
-  return reinterpret_cast<wxThread::ExitCode>(0);
+
+  wxPostEvent (m_pSupervisor, eventDone);
+
+    return reinterpret_cast<wxThread::ExitCode>(0);
 }
 
 void