void SFTWorker::run() { assert(m_pCT); while (true) { uint32 status = m_pCT->getStatus(m_uiId); int32 res = BZ_OK; while (status == BaseMCFThread::SF_STATUS_PAUSE) { gcSleep(500); status = m_pCT->getStatus(m_uiId); } if (status == BaseMCFThread::SF_STATUS_STOP) { break; } else if (status == BaseMCFThread::SF_STATUS_NULL) { if (!newTask()) gcSleep(500); continue; } else if (status == BaseMCFThread::SF_STATUS_ENDFILE) { do { res = doWork(); if (bzErrorCheck(res)) break; } while (res != BZ_STREAM_END); } else if (status == BaseMCFThread::SF_STATUS_CONTINUE) { res = doWork(); bzErrorCheck(res); } if (res == BZ_STREAM_END || status == BaseMCFThread::SF_STATUS_SKIP) finishFile(); } }
void LCovRuntime::writeLCovResult(LCovCompartment& comp) { if (!out_.isInitialized()) return; uint32_t p = getpid(); if (pid_ != p) { pid_ = p; finishFile(); init(); if (!out_.isInitialized()) return; } comp.exportInto(out_, &isEmpty_); out_.flush(); }
void LCovRuntime::writeLCovResult(LCovCompartment& comp) { if (!out_.isInitialized()) return; #if defined(XP_WIN) size_t p = GetCurrentProcessId(); #else size_t p = getpid(); #endif if (pid_ != p) { pid_ = p; finishFile(); init(); if (!out_.isInitialized()) return; } comp.exportInto(out_, &isEmpty_); out_.flush(); }
LCovRuntime::~LCovRuntime() { if (out_.isInitialized()) finishFile(); }