@@ -3521,6 +3521,8 @@ bool CacheAllocator<CacheTrait>::stopWorkers(std::chrono::seconds timeout) {
35213521 success &= stopPoolResizer (timeout);
35223522 success &= stopMemMonitor (timeout);
35233523 success &= stopReaper (timeout);
3524+ success &= stopBackgroundEvictor (timeout);
3525+ success &= stopBackgroundPromoter (timeout);
35243526 return success;
35253527}
35263528
@@ -4021,6 +4023,26 @@ bool CacheAllocator<CacheTrait>::stopReaper(std::chrono::seconds timeout) {
40214023 return stopWorker (" Reaper" , reaper_, timeout);
40224024}
40234025
4026+ template <typename CacheTrait>
4027+ bool CacheAllocator<CacheTrait>::stopBackgroundEvictor(std::chrono::seconds timeout) {
4028+ bool result = true ;
4029+ for (size_t i = 0 ; i < backgroundEvictor_.size (); i++) {
4030+ auto ret = stopWorker (" BackgroundEvictor" , backgroundEvictor_[i], timeout);
4031+ result = result && ret;
4032+ }
4033+ return result;
4034+ }
4035+
4036+ template <typename CacheTrait>
4037+ bool CacheAllocator<CacheTrait>::stopBackgroundPromoter(std::chrono::seconds timeout) {
4038+ bool result = true ;
4039+ for (size_t i = 0 ; i < backgroundPromoter_.size (); i++) {
4040+ auto ret = stopWorker (" BackgroundPromoter" , backgroundPromoter_[i], timeout);
4041+ result = result && ret;
4042+ }
4043+ return result;
4044+ }
4045+
40244046template <typename CacheTrait>
40254047bool CacheAllocator<CacheTrait>::cleanupStrayShmSegments(
40264048 const std::string& cacheDir, bool posix /* TODO(SHM_FILE): const std::vector<CacheMemoryTierConfig>& config */ ) {
0 commit comments