| 508 | } |
| 509 | |
| 510 | void 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 | } |