MCPcopy Create free account
hub / github.com/cocos/cocos-engine / pop

Method pop

native/cocos/base/ThreadPool.h:160–167  ·  view source on GitHub ↗

deletes the retrieved element, do not use for non integral types

Source from the content-addressed store, hash-verified

158
159 // deletes the retrieved element, do not use for non integral types
160 bool pop(T &v) {
161 std::unique_lock<std::mutex> lock(this->mutex);
162 if (this->q.empty())
163 return false;
164 v = this->q.front();
165 this->q.pop();
166 return true;
167 }
168
169 bool empty() const {
170 auto thiz = const_cast<ThreadSafeQueue *>(this);

Callers 4

stopAllTasksMethod · 0.45
stopTasksByTypeMethod · 0.45
setThreadMethod · 0.45
ReleaseJsvmDataMethod · 0.45

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected