MCPcopy Create free account
hub / github.com/catboost/catboost / GetJob

Method GetJob

library/cpp/threading/local_executor/local_executor.cpp:201–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201bool NPar::TLocalExecutor::TImpl::GetJob(TSingleJob* job) {
202 if (JobQueue.Dequeue(job)) {
203 CurrentTaskPriority = TLocalExecutor::HIGH_PRIORITY;
204 --QueueSize;
205 return true;
206 } else if (MedJobQueue.Dequeue(job)) {
207 CurrentTaskPriority = TLocalExecutor::MED_PRIORITY;
208 --MPQueueSize;
209 return true;
210 } else if (LowJobQueue.Dequeue(job)) {
211 CurrentTaskPriority = TLocalExecutor::LOW_PRIORITY;
212 --LPQueueSize;
213 return true;
214 }
215 return false;
216}
217
218void NPar::TLocalExecutor::TImpl::RunNewThread() {
219 ++ThreadCount;

Callers 1

HostWorkerThreadMethod · 0.80

Calls 1

DequeueMethod · 0.45

Tested by

no test coverage detected