MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / getJob

Method getJob

ASAP/IOThread.cpp:103–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103ThreadJob* IOThread::getJob() {
104 _jobListMutex.lock();
105 while (_jobList.empty() && !_abort) {
106 _threadsWaiting++;
107 _condition.wait(&_jobListMutex);
108 _threadsWaiting--;
109 }
110 if (_abort) {
111 _jobListMutex.unlock();
112 return NULL;
113 }
114 ThreadJob* job = _jobList.front();
115 _jobList.pop_front();
116 _jobListMutex.unlock();
117 return job;
118}
119
120void IOThread::clearJobs() {
121 QMutexLocker locker(&_jobListMutex);

Callers 1

runMethod · 0.80

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected