void BaseThread::doRun() { m_pPrivates->m_bIsRunning = true; applyPriority(); setThreadName(); run(); }
void UThread::ThreadMain() { runningMutex_.lock(); applyPriority(); applyAffinity(); #if PRINT_DEBUG ULOGGER_DEBUG("before mainLoopBegin()"); #endif state_ = kSRunning; mainLoopBegin(); #if PRINT_DEBUG ULOGGER_DEBUG("before mainLoop()"); #endif while(state_ == kSRunning) { mainLoop(); } #if PRINT_DEBUG ULOGGER_DEBUG("before mainLoopEnd()"); #endif mainLoopEnd(); handle_ = 0; threadId_ = 0; state_ = kSIdle; runningMutex_.unlock(); #if PRINT_DEBUG ULOGGER_DEBUG("Exiting thread loop"); #endif }