MCPcopy Create free account
hub / github.com/acl-dev/acl / peek

Method peek

lib_acl_cpp/include/acl_cpp.cn/stdlib/tbox.hpp:195–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193 thread_cond cond_;
194
195 T* peek(bool& found_flag) {
196 typename std::list<T*>::iterator it = tbox_.begin();
197 if (it == tbox_.end()) {
198 found_flag = false;
199 return NULL;
200 }
201 found_flag = true;
202 size_--;
203 T* t = *it;
204 tbox_.erase(it);
205 return t;
206 }
207};
208
209} // namespace acl

Callers 1

peekFunction · 0.45

Calls 2

beginMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected