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

Method with_lock

library/cpp/testing/benchmark/bench.cpp:412–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410
411 void Report(TResult&& result) override {
412 with_lock (ResultsLock_) {
413 OrderedResultQueue_.emplace(result.TestId, std::move(result));
414 while (!OrderedResultQueue_.empty() && OrderedResultQueue_.begin()->first <= ExpectedTestId_) {
415 Slave_->Report(std::move(OrderedResultQueue_.begin()->second));
416 OrderedResultQueue_.erase(OrderedResultQueue_.begin());
417 ++ExpectedTestId_;
418 }
419 }
420 }
421
422 void Finish() override {

Callers

nothing calls this directly

Calls 6

moveFunction · 0.50
emplaceMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
ReportMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected