30 template <
typename T,
template <
typename>
class Atom = std::atomic>
32 template <
typename Node>
52 auto p =
head_.load();
54 auto next = p->next_.load();
63 auto curr = prev->load(std::memory_order_relaxed);
64 if (curr && curr->elem_ == v) {
71 bool remove(
const T&
v) {
74 auto curr = prev->load(std::memory_order_relaxed);
75 if (!curr || curr->elem_ !=
v) {
80 prev->store(curr_next, std::memory_order_release);
82 curr->next_.store(
nullptr, std::memory_order_release);
95 auto curr = prev->load(std::memory_order_acquire);
103 auto next = curr->next_.load(std::memory_order_acquire);
104 if (prev->load(std::memory_order_acquire) != curr) {
107 if (curr->elem_ == val) {
109 }
else if (!(curr->elem_ < val)) {
112 prev = &(curr->next_);
122 auto curr = prev->load(std::memory_order_relaxed);
124 if (curr->elem_ >= v) {
127 prev = &(curr->next_);
128 curr = curr->next_.load(std::memory_order_relaxed);
FOLLY_ALWAYS_INLINE bool try_protect(T *&ptr, const Atom< T * > &src) noexcept
constexpr detail::Map< Move > move
—— Concurrent Priority Queue Implementation ——
bool contains(const T &val) const
void locate_lower_bound(const T &v, Atom< Node * > *&prev) const
void swap(SwapTrackingAlloc< T > &, SwapTrackingAlloc< T > &)