MCPcopy Create free account
hub / github.com/bytedance/bolt / getFuture

Method getFuture

bolt/common/caching/AsyncDataCache.h:296–301  ·  view source on GitHub ↗

Returns a future that will be realized when a caller can retry getting 'this'. Must be called inside the mutex of 'shard_'.

Source from the content-addressed store, hash-verified

294 // Returns a future that will be realized when a caller can retry getting
295 // 'this'. Must be called inside the mutex of 'shard_'.
296 folly::SemiFuture<bool> getFuture() {
297 if (promise_ == nullptr) {
298 promise_ = std::make_unique<folly::SharedPromise<bool>>();
299 }
300 return promise_->getSemiFuture();
301 }
302
303 // Holds an owning reference to the file number.
304 FileCacheKey key_;

Callers 2

dequeueMethod · 0.80
findOrCreateMethod · 0.80

Calls

no outgoing calls

Tested by 1

dequeueMethod · 0.64