libstdc++
|
#include <queue.h>
Public Member Functions | |
_RestrictedBoundedConcurrentQueue (_SequenceIndex __max_size) | |
~_RestrictedBoundedConcurrentQueue () | |
bool | pop_back (_Tp &__t) |
bool | pop_front (_Tp &__t) |
void | push_front (const _Tp &__t) |
Double-ended queue of bounded size, allowing lock-free atomic access. push_front() and pop_front() must not be called concurrently to each other, while pop_back() can be called concurrently at all times. empty()
, size()
, and top()
are intentionally not provided. Calling them would not make sense in a concurrent setting.
_Tp | Contained element type. |
|
inline |
Constructor. Not to be called concurrent, of course.
__max_size | Maximal number of elements to be contained. |
Definition at line 68 of file queue.h.
References __gnu_parallel::__encode2().
|
inline |
|
inline |
Pops one element from the queue at the front end. Must not be called concurrently with pop_front().
Definition at line 127 of file queue.h.
References __gnu_parallel::__compare_and_swap(), __gnu_parallel::__decode2(), and __gnu_parallel::__encode2().
|
inline |
Pops one element from the queue at the front end. Must not be called concurrently with pop_front().
Definition at line 100 of file queue.h.
References __gnu_parallel::__compare_and_swap(), __gnu_parallel::__decode2(), and __gnu_parallel::__encode2().
|
inline |
Pushes one element into the queue at the front end. Must not be called concurrently with pop_front().
Definition at line 83 of file queue.h.
References __gnu_parallel::__decode2(), __gnu_parallel::__encode2(), and __gnu_parallel::__fetch_and_add().