MCPcopy Create free account
hub / github.com/apache/impala / Enqueue

Method Enqueue

be/src/util/internal-queue.h:97–111  ·  view source on GitHub ↗

Enqueue node onto the queue's tail. This is O(1).

Source from the content-addressed store, hash-verified

95
96 /// Enqueue node onto the queue's tail. This is O(1).
97 void Enqueue(T* n) {
98 Node* node = (Node*)n;
99 DCHECK(node->next == nullptr);
100 DCHECK(node->prev == nullptr);
101 DCHECK(node->parent_queue == nullptr);
102 node->parent_queue = this;
103 {
104 std::lock_guard<LockType> lock(lock_);
105 if (tail_ != nullptr) tail_->next = node;
106 node->prev = tail_;
107 tail_ = node;
108 if (head_ == nullptr) head_ = node;
109 ++size_;
110 }
111 }
112
113 /// Pushes the node onto the queue's head. This is O(1).
114 void PushFront(T* n) {

Callers 4

SubmitForAdmissionMethod · 0.45
TEST_FFunction · 0.45
TESTFunction · 0.45
ProducerThreadFunction · 0.45

Calls

no outgoing calls

Tested by 3

TEST_FFunction · 0.36
TESTFunction · 0.36
ProducerThreadFunction · 0.36