tbb::internal::queue_and_mutex< T, mutex_t > Struct Template Reference

Essentially, this is just a pair of a queue and a mutex to protect the queue. More...

`#include <task_stream.h>`

Inheritance diagram for tbb::internal::queue_and_mutex< T, mutex_t >:
Collaboration diagram for tbb::internal::queue_and_mutex< T, mutex_t >:

## Public Types

typedef std::deque< T, tbb_allocator< T > > | queue_base_t
typedef std::deque< T, tbb_allocator< T > > | queue_base_t

## Public Member Functions

| queue_and_mutex ()
| ~queue_and_mutex ()
| queue_and_mutex ()
| ~queue_and_mutex ()

## Public Attributes

queue_base_t | my_queue
mutex_t | my_mutex

## Detailed Description

### template<typename T, typename mutex_t>
struct tbb::internal::queue_and_mutex< T, mutex_t >

Essentially, this is just a pair of a queue and a mutex to protect the queue.

The reason std::pair is not used is that the code would look less clean if field names were replaced with 'first' and 'second'.

Definition at line 36 of file task_stream.h.

## Member Typedef Documentation

## queue_base_t [1/2]

template<typename T , typename mutex_t >

typedef std::deque< T, tbb_allocator<T> > tbb::internal::queue_and_mutex< T, mutex_t >::queue_base_t

Definition at line 37 of file task_stream.h.

## queue_base_t [2/2]

template<typename T , typename mutex_t >

typedef std::deque< T, tbb_allocator<T> > tbb::internal::queue_and_mutex< T, mutex_t >::queue_base_t

Definition at line 53 of file task_stream_extended.h.

## Constructor & Destructor Documentation

## queue_and_mutex() [1/2]

template<typename T , typename mutex_t >

tbb::internal::queue_and_mutex< T, mutex_t >::queue_and_mutex | ( |  | ) |

inline

Definition at line 42 of file task_stream.h.

: my_queue(), my_mutex() {}

## ~queue_and_mutex() [1/2]

template<typename T , typename mutex_t >

tbb::internal::queue_and_mutex< T, mutex_t >::~queue_and_mutex | ( |  | ) |

inline

Definition at line 43 of file task_stream.h.

{}

## queue_and_mutex() [2/2]

template<typename T , typename mutex_t >

tbb::internal::queue_and_mutex< T, mutex_t >::queue_and_mutex | ( |  | ) |

inline

Definition at line 58 of file task_stream_extended.h.

: my_queue(), my_mutex() {}

## ~queue_and_mutex() [2/2]

template<typename T , typename mutex_t >

tbb::internal::queue_and_mutex< T, mutex_t >::~queue_and_mutex | ( |  | ) |

inline

Definition at line 59 of file task_stream_extended.h.

{}

## Member Data Documentation

## my_mutex

template<typename T , typename mutex_t >

mutex_t tbb::internal::queue_and_mutex< T, mutex_t >::my_mutex

Definition at line 40 of file task_stream.h.

Referenced by tbb::internal::task_stream< num_priority_levels >::drain(), tbb::internal::task_stream< num_priority_levels >::pop(), tbb::internal::task_stream< num_priority_levels >::pop_specific(), and tbb::internal::task_stream< num_priority_levels >::try_pop().

## my_queue

template<typename T , typename mutex_t >

queue_base_t tbb::internal::queue_and_mutex< T, mutex_t >::my_queue

Definition at line 39 of file task_stream.h.

Referenced by tbb::internal::task_stream< num_priority_levels >::drain(), tbb::internal::task_stream< num_priority_levels >::pop(), tbb::internal::task_stream< num_priority_levels >::pop_specific(), and tbb::internal::task_stream< num_priority_levels >::try_pop().

The documentation for this struct was generated from the following files:

- task_stream.h
- task_stream_extended.h

tbb::internal::queue_and_mutex::my_mutex
mutex_t my_mutex
Definition: task_stream.h:40
tbb::internal::queue_and_mutex::my_queue
queue_base_t my_queue
Definition: task_stream.h:39

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.