Public Types | Public Member Functions | Private Attributes | List of all members
pal_statistics::LockFreeQueue< T > Class Template Reference

Simple wrapper around boost lockfree queue to keep track of the reserved memory Boost's implementation of reserve always increases the capacity by the specified size. More...

#include <pal_statistics_utils.h>

Inheritance diagram for pal_statistics::LockFreeQueue< T >:
Inheritance graph
[legend]

Public Types

typedef boost::lockfree::queue< T > BaseType
 

Public Member Functions

bool bounded_push (T const &t)
 
 LockFreeQueue ()
 
template<typename U >
bool pop (U &ret)
 
void set_capacity (typename BaseType::size_type n)
 

Private Attributes

std::atomic< size_t > reserved_size
 

Detailed Description

template<typename T>
class pal_statistics::LockFreeQueue< T >

Simple wrapper around boost lockfree queue to keep track of the reserved memory Boost's implementation of reserve always increases the capacity by the specified size.

Definition at line 54 of file pal_statistics_utils.h.

Member Typedef Documentation

◆ BaseType

template<typename T >
typedef boost::lockfree::queue<T> pal_statistics::LockFreeQueue< T >::BaseType

Definition at line 57 of file pal_statistics_utils.h.

Constructor & Destructor Documentation

◆ LockFreeQueue()

template<typename T >
pal_statistics::LockFreeQueue< T >::LockFreeQueue ( )
inline

Definition at line 59 of file pal_statistics_utils.h.

Member Function Documentation

◆ bounded_push()

template<typename T >
bool pal_statistics::LockFreeQueue< T >::bounded_push ( T const &  t)
inline

Definition at line 72 of file pal_statistics_utils.h.

◆ pop()

template<typename T >
template<typename U >
bool pal_statistics::LockFreeQueue< T >::pop ( U &  ret)
inline

Definition at line 78 of file pal_statistics_utils.h.

◆ set_capacity()

template<typename T >
void pal_statistics::LockFreeQueue< T >::set_capacity ( typename BaseType::size_type  n)
inline

Definition at line 62 of file pal_statistics_utils.h.

Member Data Documentation

◆ reserved_size

template<typename T >
std::atomic<size_t> pal_statistics::LockFreeQueue< T >::reserved_size
private

Definition at line 84 of file pal_statistics_utils.h.


The documentation for this class was generated from the following file:


pal_statistics
Author(s):
autogenerated on Fri Aug 2 2024 08:29:35