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

Method DropAllLoaders

catboost/private/libs/quantized_pool/loader.cpp:510–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510void NCB::TQuantizedPoolLoadersCache::DropAllLoaders() {
511 auto& loadersCache = GetRef();
512 with_lock(loadersCache.Lock) {
513 CATBOOST_DEBUG_LOG << __PRETTY_FUNCTION__ << ": loaders cache size " << loadersCache.Cache.size() << Endl;
514 for (auto& keyValue : loadersCache.Cache) {
515 CB_ENSURE(
516 keyValue.second.RefCount() <= 1,
517 "Loader for " << keyValue.first.first.Scheme << "://" << keyValue.first.first.Path
518 << " is still referenced");
519 }
520 loadersCache.Cache.clear();
521 }
522}

Callers

nothing calls this directly

Calls 4

with_lockFunction · 0.50
sizeMethod · 0.45
RefCountMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected