MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / unregisterThreadForRender

Method unregisterThreadForRender

Engine/AbortableRenderInfo.cpp:157–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157bool
158AbortableRenderInfo::unregisterThreadForRender(AbortableThread* thread)
159{
160 bool ret = false;
161 bool threadsEmpty = false;
162 {
163 QMutexLocker k(&_imp->threadsMutex);
164 ThreadSet::iterator found = _imp->threadsForThisRender.find(thread);
165
166 if ( found != _imp->threadsForThisRender.end() ) {
167 _imp->threadsForThisRender.erase(found);
168 ret = true;
169 }
170 // Stop the timer if no more threads are running for this render
171 threadsEmpty = _imp->threadsForThisRender.empty();
172 }
173
174 if (threadsEmpty) {
175 {
176 QMutexLocker k(&_imp->timerMutex);
177 if (_imp->abortTimeoutTimer) {
178 _imp->timerStarted = false;
179 }
180 }
181 }
182
183 return ret;
184}
185
186void
187AbortableRenderInfo::onStartTimerInOriginalThreadTriggered()

Callers 1

clearAbortInfoMethod · 0.80

Calls 4

emptyMethod · 0.80
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected