MCPcopy Create free account
hub / github.com/IENT/YUView / startWorkerThreads

Method startWorkerThreads

YUViewLib/src/video/VideoCache.cpp:300–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300void VideoCache::startWorkerThreads(int nrThreads)
301{
302 for (int i = 0; i < nrThreads; i++)
303 {
304 loadingThread *newThread = new loadingThread(this);
305 cachingThreadList.append(newThread);
306
307 // Caching should run in the background without interrupting normal operation. Start with lowest
308 // priority.
309 newThread->start(QThread::LowestPriority);
310
311 // Connect the signals/slots to communicate with the cacheWorker.
312 connect(newThread->worker(),
313 &loadingWorker::loadingFinished,
314 this,
315 &VideoCache::threadCachingFinished);
316
317 DEBUG_CACHING("VideoCache::startWorkerThreads Started thread %p", newThread);
318
319 if (workersState == workersRunning)
320 // Push the next job to the worker. Otherwise it will not start working if caching is
321 // currently running.
322 pushNextJobToCachingThread(newThread);
323 }
324}
325
326void VideoCache::updateSettings()
327{

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
workerMethod · 0.80

Tested by

no test coverage detected