5#ifndef V8_UTILS_LOCKED_QUEUE_INL_H_
6#define V8_UTILS_LOCKED_QUEUE_INL_H_
17template <
typename Record>
24template <
typename Record>
32template <
typename Record>
35 Node* old_node =
nullptr;
36 Node* cur_node = head_;
37 while (cur_node !=
nullptr) {
39 cur_node = cur_node->
next.Value();
44template <
typename Record>
48 n->value = std::move(
record);
52 tail_->next.SetValue(n);
57template <
typename Record>
59 Node* old_head =
nullptr;
63 Node*
const next_node = head_->
next.Value();
64 if (next_node ==
nullptr)
return false;
67 size_t old_size =
size_.fetch_sub(1);
75template <
typename Record>
78 return head_->next.Value() ==
nullptr;
81template <
typename Record>
84 Node*
const next_node = head_->
next.Value();
85 if (next_node ==
nullptr)
return false;
90template <
typename Record>
bool Peek(Record *record) const
void Enqueue(Record record)
bool Dequeue(Record *record)
#define CHECK_NOT_NULL(val)
#define DCHECK_GT(v1, v2)
base::AtomicValue< Node * > next