#include <lock_free_stack.h>
Public Member Functions | |
void | push (const_reference value) |
Pushes a value onto the top of the stack. | |
bool | pop (pointer value_out) |
bool | empty () const |
Tests if the stack is empty, limited utility for a concurrent container. | |
A lock-free stack implementation. Requires an allocator, which must also be lock-free, allow stale reads, and not recycle allocations concurrently (to avoid the ABA problem).
|
inline |
Attempts to pop a value from the top of the stack. Returns false if the stack was empty, otherwise popped value is stored in value_out and returns true.