Skip to content

Commit 453c1b5

Browse files
committed
address review comment
1 parent 148c8c3 commit 453c1b5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

google/cloud/storage/internal/bucket_metadata_cache.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@ class BucketMetadataCache {
6767
std::unordered_set<std::string> in_flight_fetch_;
6868
};
6969

70+
// Tracks an in-flight fetch and clears it when destroyed.
7071
class ScopedFetch {
7172
public:
7273
ScopedFetch() = default;
74+
// Shared ownership of BucketMetadataCache keeps the cache alive during async
75+
// callbacks and ensures ScopedFetch remains copyable for lambda captures.
7376
ScopedFetch(std::shared_ptr<BucketMetadataCache> cache,
7477
std::string bucket_name)
7578
: state_(std::make_shared<State>(std::move(cache),

0 commit comments

Comments
 (0)