6 #ifndef IROHA_SINGLE_POINTER_CACHE_HPP 7 #define IROHA_SINGLE_POINTER_CACHE_HPP 19 template <
typename DataType>
47 mutable std::mutex mutex_;
50 template <
typename DataType>
53 std::lock_guard<std::mutex> lock(mutex_);
55 stored_data_ = std::move(data);
58 template <
typename DataType>
61 std::lock_guard<std::mutex> lock(mutex_);
66 template <
typename DataType>
68 std::lock_guard<std::mutex> lock(mutex_);
76 #endif // IROHA_SINGLE_POINTER_CACHE_HPP void insert(DataPointer data)
Definition: single_pointer_cache.hpp:51
Definition: single_pointer_cache.hpp:20
std::shared_ptr< std::decay_t< DataType >> DataPointer
Definition: single_pointer_cache.hpp:25
Definition: block_query.hpp:16
void release()
Definition: single_pointer_cache.hpp:67
DataPointer get() const
Definition: single_pointer_cache.hpp:60