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

Method Exec

library/cpp/threading/local_executor/local_executor.cpp:249–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249void NPar::TLocalExecutor::Exec(TIntrusivePtr<ILocallyExecutable> exec, int id, int flags) {
250 Y_ASSERT((flags & WAIT_COMPLETE) == 0); // unsupported
251 int prior = Max<int>(Impl_->CurrentTaskPriority, flags & PRIORITY_MASK);
252 switch (prior) {
253 case HIGH_PRIORITY:
254 ++Impl_->QueueSize;
255 Impl_->JobQueue.Enqueue(TSingleJob(std::move(exec), id));
256 break;
257 case MED_PRIORITY:
258 ++Impl_->MPQueueSize;
259 Impl_->MedJobQueue.Enqueue(TSingleJob(std::move(exec), id));
260 break;
261 case LOW_PRIORITY:
262 ++Impl_->LPQueueSize;
263 Impl_->LowJobQueue.Enqueue(TSingleJob(std::move(exec), id));
264 break;
265 default:
266 Y_ASSERT(0);
267 break;
268 }
269 Impl_->HasJob.Signal();
270}
271
272void NPar::ILocalExecutor::Exec(TLocallyExecutableFunction exec, int id, int flags) {
273 Exec(new TFunctionWrapper(std::move(exec)), id, flags);

Callers

nothing calls this directly

Calls 4

TSingleJobClass · 0.85
moveFunction · 0.50
EnqueueMethod · 0.45
SignalMethod · 0.45

Tested by

no test coverage detected