19 #ifndef MIR_CACHED_PTR_H_ 20 #define MIR_CACHED_PTR_H_ 27 template<
typename Type>
30 std::weak_ptr<Type> cache;
36 std::shared_ptr<Type>
operator()(std::function<std::shared_ptr<Type>()> make)
38 auto result = cache.lock();
41 cache = result = make();
48 #endif // MIR_CACHED_PTR_H_ AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: blob.h:26
Definition: cached_ptr.h:28
std::shared_ptr< Type > operator()(std::function< std::shared_ptr< Type >()> make)
Definition: cached_ptr.h:36