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

Method WaitForJob

util/thread/pool.cpp:529–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527 }
528
529 inline IObjectInQueue* WaitForJob() noexcept {
530 Mutex_.Acquire();
531
532 ++Free_;
533
534 while (!Obj_ && !AllDone_) {
535 if (!CondReady_.WaitT(Mutex_, IdleTime_)) {
536 break;
537 }
538 }
539
540 IObjectInQueue* ret = Obj_;
541 Obj_ = nullptr;
542
543 --Free_;
544
545 Mutex_.Release();
546 CondFree_.Signal();
547
548 return ret;
549 }
550
551private:
552 TAdaptiveThreadPool* Parent_;

Callers 1

DoExecuteMethod · 0.80

Calls 4

AcquireMethod · 0.45
WaitTMethod · 0.45
ReleaseMethod · 0.45
SignalMethod · 0.45

Tested by

no test coverage detected