Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
cartographer::common::LocklessQueue< T > Class Template Reference

#include <lockless_queue.h>

Classes

struct  Node
 

Public Member Functions

 LocklessQueue ()
 
std::unique_ptr< T > Pop ()
 
void Push (std::unique_ptr< T > t)
 
 ~LocklessQueue ()
 

Private Member Functions

void FreeNodes (Node *node)
 
NodePopNodeFromFreeList ()
 
void PushNodeToList (std::atomic< Node *> *list_head, Node *node)
 
void SwapLists ()
 

Private Attributes

Nodedata_list_head_
 
Nodedata_list_tail_
 
std::atomic< Node * > free_list_head_
 
std::atomic< Node * > incoming_data_list_head_
 

Detailed Description

template<typename T>
class cartographer::common::LocklessQueue< T >

Definition at line 35 of file lockless_queue.h.

Constructor & Destructor Documentation

◆ LocklessQueue()

template<typename T >
cartographer::common::LocklessQueue< T >::LocklessQueue ( )
inline

Definition at line 37 of file lockless_queue.h.

◆ ~LocklessQueue()

template<typename T >
cartographer::common::LocklessQueue< T >::~LocklessQueue ( )
inline

Definition at line 44 of file lockless_queue.h.

Member Function Documentation

◆ FreeNodes()

template<typename T >
void cartographer::common::LocklessQueue< T >::FreeNodes ( Node node)
inlineprivate

Definition at line 88 of file lockless_queue.h.

◆ Pop()

template<typename T >
std::unique_ptr<T> cartographer::common::LocklessQueue< T >::Pop ( )
inline

Definition at line 60 of file lockless_queue.h.

◆ PopNodeFromFreeList()

template<typename T >
Node* cartographer::common::LocklessQueue< T >::PopNodeFromFreeList ( )
inlineprivate

Definition at line 111 of file lockless_queue.h.

◆ Push()

template<typename T >
void cartographer::common::LocklessQueue< T >::Push ( std::unique_ptr< T >  t)
inline

Definition at line 51 of file lockless_queue.h.

◆ PushNodeToList()

template<typename T >
void cartographer::common::LocklessQueue< T >::PushNodeToList ( std::atomic< Node *> *  list_head,
Node node 
)
inlineprivate

Definition at line 97 of file lockless_queue.h.

◆ SwapLists()

template<typename T >
void cartographer::common::LocklessQueue< T >::SwapLists ( )
inlineprivate

Definition at line 128 of file lockless_queue.h.

Member Data Documentation

◆ data_list_head_

template<typename T >
Node* cartographer::common::LocklessQueue< T >::data_list_head_
private

Definition at line 165 of file lockless_queue.h.

◆ data_list_tail_

template<typename T >
Node* cartographer::common::LocklessQueue< T >::data_list_tail_
private

Definition at line 168 of file lockless_queue.h.

◆ free_list_head_

template<typename T >
std::atomic<Node*> cartographer::common::LocklessQueue< T >::free_list_head_
private

Definition at line 159 of file lockless_queue.h.

◆ incoming_data_list_head_

template<typename T >
std::atomic<Node*> cartographer::common::LocklessQueue< T >::incoming_data_list_head_
private

Definition at line 162 of file lockless_queue.h.


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


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:59