MCPcopy Create free account
hub / github.com/Gecode/gecode / next

Method next

gecode/support/run-jobs.hpp:199–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197
198 template<class Jobs, class RetType>
199 forceinline Job<RetType>*
200 RunJobs<Jobs,RetType>::Master::next(int& i) {
201 m.acquire();
202 Job<RetType>* j;
203 if (jobs() && !stopped()) {
204 j = jobs.job(); i=idx++;
205 } else {
206 j = nullptr;
207 n_threads--;
208 e.signal();
209 }
210 m.release();
211 return j;
212 }
213
214 template<class Jobs, class RetType>
215 forceinline void

Callers 1

runMethod · 0.45

Calls 3

acquireMethod · 0.45
signalMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected