MCPcopy Create free account
hub / github.com/ComodoSecurity/openedr / tryToPut

Method tryToPut

edrav2/iprj/libcore/src/queue.cpp:209–227  ·  view source on GitHub ↗

This method should be called under the mutex

Source from the content-addressed store, hash-verified

207// This method should be called under the mutex
208//
209bool Queue::tryToPut(const Variant& vData)
210{
211 bool fNoOverflow = true;
212 ++m_nPutTryCount;
213 auto nSize = m_data.size();
214 if (nSize >= m_nMaxSize)
215 {
216 if (!m_fCircular) return false;
217
218 // Process circular mode - remove the most old event
219 fNoOverflow = false;
220 m_data.pop_front();
221 ++m_nDropCount;
222 }
223
224 m_data.push_back(vData);
225 ++m_nPutCount;
226 return fNoOverflow;
227}
228
229//
230//

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
pop_frontMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected