OSDN Git Service

Refactored "common" thread code into a separate base class. Make additional thread...
[x264-launcher/x264-launcher.git] / src / thread_startup.cpp
index 33887f3..d26af3a 100644 (file)
@@ -35,8 +35,6 @@
 
 StarupThread::StarupThread(void)
 {
-       m_exception = false;
-       m_success = 0;
 }
 
 StarupThread::~StarupThread(void)
@@ -44,43 +42,6 @@ StarupThread::~StarupThread(void)
 }
 
 //-------------------------------------
-// Thread entry point
-//-------------------------------------
-
-void StarupThread::run(void)
-{
-       m_exception = false;
-       m_success = 0;
-       runChecked1(this, m_success, &m_exception);
-}
-
-void StarupThread::runChecked1(StarupThread *const thread, volatile int &success, volatile bool *exception)
-{
-       __try
-       {
-               return runChecked2(thread, success, exception);
-       }
-       __except(1)
-       {
-               *exception = true;
-               qWarning("Unhandled exception error in startup thread !!!");
-       }
-}
-
-void StarupThread::runChecked2(StarupThread *const thread, volatile int &success, volatile bool *exception)
-{
-       try
-       {
-               success = thread->threadMain();
-       }
-       catch(...)
-       {
-               *exception = true;
-               qWarning("Startup thread raised an C++ exception!");
-       }
-}
-
-//-------------------------------------
 // Utility functions
 //-------------------------------------