| 39 | } |
| 40 | |
| 41 | void BackupSizeCache::request(u64 id, const std::string& rootPath) |
| 42 | { |
| 43 | std::lock_guard<std::mutex> lock(mMutex); |
| 44 | if (mStop.load() || mCache.count(id) != 0 || mPending.count(id) != 0) { |
| 45 | return; |
| 46 | } |
| 47 | mPending.insert(id); |
| 48 | mQueue.emplace_back(id, rootPath); |
| 49 | ensureWorker(); |
| 50 | mCond.notify_one(); |
| 51 | } |
| 52 | |
| 53 | std::optional<u64> BackupSizeCache::total(u64 id) |
| 54 | { |
no test coverage detected