C++ (Qt)void MyThread::run( void ){ while (!mAbortFlag) { while (mPauseFlag) msleep(SOME_DELAY); // do job }}