59 if (!isRunning())
return;
78 m_updaterContext->m_exclusiveJobLock.lockForWrite();
80 m_updaterContext->m_exclusiveJobLock.lockForRead();
83 if(m_atomicType == Type::MERGE) {
87 m_atomicType == Type::SPONTANEOUS);
90#ifdef DEBUG_JOBS_SEQUENCE
91 if (m_atomicType == Type::STROKE) {
92 qDebug() <<
"running: stroke" << m_runnableJob->debugName();
93 }
else if (m_atomicType == Type::SPONTANEOUS) {
94 qDebug() <<
"running: spont " << m_runnableJob->debugName();
96 qDebug() <<
"running: unkn. " << m_runnableJob->debugName();
100 m_runnableJob->run();
106 m_updaterContext->doSomeUsefulWork();
109 m_updaterContext->jobFinished();
111 m_updaterContext->m_exclusiveJobLock.unlock();
115 Type expectedValue = Type::WAITING;
116 if (m_atomicType.compare_exchange_strong(expectedValue, Type::EMPTY)) {
160 m_runnableJob = strokeJob;
165 m_accessRect = m_changeRect = QRect();
167 const Type oldState = m_atomicType.exchange(Type::STROKE);
168 return oldState == Type::EMPTY;