22 template <
typename T,
template <
typename>
class Atom = std::atomic>
33 for (
auto node =
head(); node; node =
next) {
37 hazptr_cleanup<Atom>();
42 while (!
cas_head(node->next_, node)) {
53 if (node ==
nullptr) {
69 return head_.load(std::memory_order_acquire);
73 return head_.compare_exchange_weak(
74 expected, newval, std::memory_order_acq_rel, std::memory_order_acquire);
bool cas_head(Node *&expected, Node *newval)
FOLLY_ALWAYS_INLINE T * get_protected(const Atom< T * > &src) noexcept
void retire(D deleter={}, hazptr_domain< Atom > &domain=default_hazptr_domain< Atom >())
—— Concurrent Priority Queue Implementation ——
Node(int v=0, Node *n=nullptr, bool=false) noexcept
FOLLY_ALWAYS_INLINE void reset(const T *ptr) noexcept