MCPcopy Create free account
hub / github.com/KDE/labplot / write

Method write

src/3rdparty/vector_blf/src/Vector/BLF/ObjectQueue.cpp:67–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66template<typename T>
67void ObjectQueue<T>::write(T * obj) {
68 /* mutex lock */
69 std::unique_lock<std::mutex> lock(m_mutex);
70
71 /* wait for free space */
72 tellgChanged.wait(lock, [&] {
73 return
74 m_abort ||
75 static_cast<uint32_t>(m_queue.size()) < m_bufferSize;
76 });
77
78 /* push data */
79 m_queue.push(obj);
80
81 /* increase put count */
82 m_tellp++;
83
84 /* shift eof */
85 if (m_tellp > m_fileSize)
86 m_fileSize = m_tellp;
87
88 /* notify */
89 tellpChanged.notify_all();
90}
91
92template<typename T>
93uint32_t ObjectQueue<T>::tellp() const {

Callers

nothing calls this directly

Calls 3

waitMethod · 0.80
pushMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected