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

Method Add

util/thread/pool.cpp:368–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366}
367
368bool TThreadPool::Add(IObjectInQueue* obj) {
369 Y_ENSURE_EX(Impl_.Get(), TThreadPoolException() << TStringBuf("mtp queue not started"));
370
371 if (Impl_->NeedRestart()) {
372 Start(Impl_->GetThreadCountExpected(), Impl_->GetMaxQueueSize());
373 }
374
375 return Impl_->Add(obj);
376}
377
378void TThreadPool::Start(size_t thrnum, size_t maxque) {
379 Impl_.Reset(new TImpl(this, thrnum, maxque, Params));

Callers 1

Y_UNIT_TESTFunction · 0.45

Calls 6

StartFunction · 0.85
NeedRestartMethod · 0.80
GetMethod · 0.45
GetMaxQueueSizeMethod · 0.45

Tested by

no test coverage detected