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

Method scheduleBlockingTask

Engine/GenericSchedulerThreadWatcher.cpp:171–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171void
172GenericWatcher::scheduleBlockingTask(int taskID,
173 const GenericWatcherCallerArgsPtr& args)
174{
175 {
176 QMutexLocker quitLocker(&_imp->mustQuitMutex);
177 if (_imp->mustQuit) {
178 return;
179 }
180 }
181
182 {
183 QMutexLocker(&_imp->tasksMutex);
184 GenericWatcherPrivate::Task t;
185 t.id = taskID;
186 t.args = args;
187 _imp->tasks.push_back(t);
188 }
189
190 if ( !isRunning() ) {
191 start();
192 } else {
193 ///Wake up the thread with a start request
194 QMutexLocker locker(&_imp->startRequestsMutex);
195 if (_imp->startRequests <= 0) {
196 ++_imp->startRequests;
197 }
198 _imp->startRequestsCond.wakeOne();
199 }
200}
201
202void
203GenericSchedulerThreadWatcher::handleBlockingTask(int taskID)

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected