MCPcopy Create free account
hub / github.com/CMU-Perceptual-Computing-Lab/openpose / forceEmplace

Method forceEmplace

include/openpose/thread/queueBase.hpp:124–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122
123 template<typename TDatums, typename TQueue>
124 bool QueueBase<TDatums, TQueue>::forceEmplace(TDatums& tDatums)
125 {
126 try
127 {
128 const std::lock_guard<std::mutex> lock{mMutex};
129 if (mTQueue.size() >= getMaxSize())
130 mTQueue.pop();
131 return emplace(tDatums);
132 }
133 catch (const std::exception& e)
134 {
135 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
136 return false;
137 }
138 }
139
140 template<typename TDatums, typename TQueue>
141 bool QueueBase<TDatums, TQueue>::tryEmplace(TDatums& tDatums)

Callers

nothing calls this directly

Calls 4

whatMethod · 0.80
errorFunction · 0.50
sizeMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected