# My Project: utils::ThreadSafeQueue< T > Class Template Reference

Loading...
Searching...
No Matches
utils::ThreadSafeQueue< T > Class Template Reference

`#include <ThreadSafeQueue.hh>`

Collaboration diagram for utils::ThreadSafeQueue< T >:

## Public Member Functions

void | push (T value)
T | wait_and_pop ()

## Private Attributes

std::queue< T > | _queue
std::mutex | _mutex
std::condition_variable | _cv

## Member Function Documentation

## push()

template<typename T>

void utils::ThreadSafeQueue< T >::push | ( | T | value | ) |

inline

References _cv, _mutex, and _queue.

## wait_and_pop()

template<typename T>

T utils::ThreadSafeQueue< T >::wait_and_pop | ( |  | ) |

inline

References _cv, _mutex, and _queue.

## Member Data Documentation

## _cv

template<typename T>

std::condition_variable utils::ThreadSafeQueue< T >::_cv

private

Referenced by push(), and wait_and_pop().

## _mutex

template<typename T>

std::mutex utils::ThreadSafeQueue< T >::_mutex

private

Referenced by push(), and wait_and_pop().

## _queue

template<typename T>

std::queue<T> utils::ThreadSafeQueue< T >::_queue

private

Referenced by push(), and wait_and_pop().

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

- include/utils/ThreadSafeQueue.hh