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

Method Put

be/src/kudu/util/blocking_queue.h:155–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153 // https://en.cppreference.com/w/cpp/utility/forward for details.
154 template<typename U>
155 QueueStatus Put(U&& val) {
156 MutexLock l(lock_);
157 if (PREDICT_FALSE(shutdown_)) {
158 return QUEUE_SHUTDOWN;
159 }
160 if (size_ >= max_size_) {
161 return QUEUE_FULL;
162 }
163 increment_size_unlocked(val);
164 queue_.emplace_back(std::forward<U>(val));
165 l.Unlock();
166 not_empty_.Signal();
167 return QUEUE_SUCCESS;
168 }
169
170 // Puts an element onto the queue; if the queue is full, blocks until space
171 // becomes available, or until the deadline passes.

Callers

nothing calls this directly

Calls 2

UnlockMethod · 0.45
SignalMethod · 0.45

Tested by

no test coverage detected