3#include <xrpl/beast/type_name.h>
41 head = instance.
head_.load();
43 }
while (instance.
head_.exchange(
this) != head);
104template <class Object>
Tracks the number of instances of an object.
CountedObject(CountedObject const &) noexcept
CountedObject & operator=(CountedObject const &) noexcept=default
static auto & getCounter() noexcept
~CountedObject() noexcept
Implementation for CountedObject.
~Counter() noexcept=default
int getCount() const noexcept
std::string const & getName() const noexcept
std::atomic< int > count_
Counter * getNext() const noexcept
Counter(std::string name) noexcept
List getCounts(int minimumThreshold) const
static CountedObjects & getInstance() noexcept
std::vector< Entry > List
std::atomic< Counter * > head_
std::atomic< int > count_
std::pair< std::string, int > Entry
CountedObjects() noexcept
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.