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

Method scheduleBlockingTask

Engine/GenericSchedulerThreadWatcher.cpp:162–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void
163GenericWatcher::scheduleBlockingTask(int taskID,
164 const boost::shared_ptr<GenericWatcherCallerArgs>& args)
165{
166 {
167 QMutexLocker quitLocker(&_imp->mustQuitMutex);
168 if (_imp->mustQuit) {
169 return;
170 }
171 }
172
173 {
174 QMutexLocker(&_imp->tasksMutex);
175 GenericWatcherPrivate::Task t;
176 t.id = taskID;
177 t.args = args;
178 _imp->tasks.push_back(t);
179 }
180
181 if ( !isRunning() ) {
182 start();
183 } else {
184 ///Wake up the thread with a start request
185 QMutexLocker locker(&_imp->startRequestsMutex);
186 if (_imp->startRequests <= 0) {
187 ++_imp->startRequests;
188 }
189 _imp->startRequestsCond.wakeOne();
190 }
191}
192
193void
194GenericSchedulerThreadWatcher::handleBlockingTask(int taskID)

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected