|
jaffarCommon
|
#include <concurrent.hpp>
Public Member Functions | |
| __JAFFAR_COMMON__INLINE__ auto & | getInternalStorage () |
| __JAFFAR_COMMON__INLINE__ void | push_back_no_lock (T element) |
| __JAFFAR_COMMON__INLINE__ void | push_back (T element) |
| __JAFFAR_COMMON__INLINE__ void | push_front_no_lock (T element) |
| __JAFFAR_COMMON__INLINE__ void | push_front (T element) |
| __JAFFAR_COMMON__INLINE__ T | front () const |
| __JAFFAR_COMMON__INLINE__ T | back () const |
| __JAFFAR_COMMON__INLINE__ void | pop_front () |
| __JAFFAR_COMMON__INLINE__ void | pop_back () |
| __JAFFAR_COMMON__INLINE__ bool | pop_back_get (T &element) |
| __JAFFAR_COMMON__INLINE__ bool | pop_front_get (T &element) |
| __JAFFAR_COMMON__INLINE__ size_t | wasSize () const |
This implementation of a concurrent doble-ended queue class was created specifically for Jaffar's engine It allows for lock-free front and back push, pop, and pop_get operations It uses a single mutex to coordinate access. This could theoretically be improved, but for the time being seems to suffice
|
inline |
|
inline |
|
inline |
|
inline |
Pops (removes) the element at the back of the Deque
|
inline |
|
inline |
Pops (removes) the element at the front of the Deque
|
inline |
|
inline |
Pushes an element to the back of the deque with locking protection
| [in] | element | The input element to push |
|
inline |
Pushes an element to the back of the deque without any locking protection
| [in] | element | The input element to push |
|
inline |
Pushes an element to the front of the deque with locking protection
| [in] | element | The input element to push |
|
inline |
Pushes an element to the front of the deque without any locking protection
| [in] | element | The input element to push |
|
inline |
Retrieves the size of the container at the time of checking