userver: userver/utils/lazy_shared_ptr.hpp File Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
lazy_shared_ptr.hpp File Reference

Detailed Description

A lazy wrapper around utils::SharedReadablePtr that fetches the data on first access.

Definition in file lazy_shared_ptr.hpp.

Go to the source code of this file.

#include <atomic>
#include <functional>
#include <memory>
#include <utility>
#include <userver/engine/sleep.hpp>
#include <userver/utils/assert.hpp>
#include <userver/utils/shared_readable_ptr.hpp>
+ Include dependency graph for lazy_shared_ptr.hpp:

Classes

class  utils::LazySharedPtr< T >
 A lazy wrapper around utils::SharedReadablePtr that fetches the data on first access. More...
 

Namespaces

namespace  utils
 Utilities.
 

Functions

template<typename Cache >
LazySharedPtr< typename Cache::DataType > utils::MakeLazyCachePtr (Cache &cache)
 Make a lazy pointer to the data of a cache.