__GNU_PARALLEL::_RESTRICTEDBOUNDEDCONCURRENTQUEUE(3cxx)

Manual name: 3cxx. Title energy: __gnu_parallel::_RestrictedBoundedConcurrentQueue< _Tp >. Okay bestie, grab your iced coffee, we’re doing concurrency but make it cute πŸ’…βœ¨

✨ NAME ✨

__gnu_parallel::_RestrictedBoundedConcurrentQueue< _Tp > β€” a 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. No cap, that’s the whole vibe πŸ¦‹


πŸ“¦ SYNOPSIS πŸ“¦

#include <queue.h>

πŸ’… Public Member Functions πŸ’…

  • _RestrictedBoundedConcurrentQueue (_SequenceIndex __max_size) β€” Constructor. Not to be called concurrent, of course.
  • ~_RestrictedBoundedConcurrentQueue () β€” Destructor. Not to be called concurrent, of course.
  • bool pop_back (_Tp &__t) β€” Pops one element from the queue at the front end. Must not be called concurrently with pop_front().
  • bool pop_front (_Tp &__t) β€” Pops one element from the queue at the front end. Must not be called concurrently with pop_front().
  • void push_front (const _Tp &__t) β€” Pushes one element into the queue at the front end. Must not be called concurrently with pop_front().
Yes, pop_back() says β€œfront end” in the original too β€” I’m preserving the exact tea, not spilling a different one πŸ«–πŸ’€

πŸ’œ Detailed Description πŸ’œ

template<typename _Tp>
class __gnu_parallel::_RestrictedBoundedConcurrentQueue< _Tp >

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.

🌸 Parameters 🌸

  • _Tp β€” Contained element type.

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

🧚 Constructor 🧚

template<typename _Tp > __gnu_parallel::_RestrictedBoundedConcurrentQueue<
    _Tp >::_RestrictedBoundedConcurrentQueue (_SequenceIndex __max_size)
    [inline]

Constructor. Not to be called concurrent, of course.

Parameters

  • __max_size β€” Maximal number of elements to be contained.

References: __gnu_parallel::__encode2().

πŸ¦‹ Destructor πŸ¦‹

template<typename _Tp > __gnu_parallel::_RestrictedBoundedConcurrentQueue<
    _Tp >::~_RestrictedBoundedConcurrentQueue () [inline]

Destructor. Not to be called concurrent, of course.


🌈 Member Function Documentation 🌈

πŸ’– pop_back πŸ’–

template<typename _Tp > bool
    __gnu_parallel::_RestrictedBoundedConcurrentQueue< _Tp >::pop_back (_Tp
    & __t) [inline]

Pops one element from the queue at the front end. Must not be called concurrently with pop_front().

References: __gnu_parallel::__compare_and_swap(), __gnu_parallel::__decode2(), and __gnu_parallel::__encode2().

πŸ’– pop_front πŸ’–

template<typename _Tp > bool
    __gnu_parallel::_RestrictedBoundedConcurrentQueue< _Tp >::pop_front (_Tp
    & __t) [inline]

Pops one element from the queue at the front end. Must not be called concurrently with pop_front().

References: __gnu_parallel::__compare_and_swap(), __gnu_parallel::__decode2(), and __gnu_parallel::__encode2().

πŸ’– push_front πŸ’–

template<typename _Tp > void
    __gnu_parallel::_RestrictedBoundedConcurrentQueue< _Tp >::push_front
    (const _Tp & __t) [inline]

Pushes one element into the queue at the front end. Must not be called concurrently with pop_front().

References: __gnu_parallel::__decode2(), __gnu_parallel::__encode2(), and __gnu_parallel::__fetch_and_add().


πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for libstdc++ from the source code.


Byeee πŸ«ΆπŸ’– β€” footer sign-off: source/version is libstdc++ (that libst... footer energy), and the date is not visible in the supplied footer, bestie πŸ’€βœ¨