MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / flush

Method flush

app/src/DataModel/FrameConsumer.h:129–141  ·  view source on GitHub ↗

* @brief Drains every pending frame without closing resources; keeps the worker reusable and * deliberately ignores the enabled flag so a just-disabled consumer still writes out its backlog. */

Source from the content-addressed store, hash-verified

127 * deliberately ignores the enabled flag so a just-disabled consumer still writes out its backlog.
128 */
129 void flush() override
130 {
131 try {
132 // code-verify off: bounded queue drain; each drainBatch() consumes items or returns 0
133 while (drainBatch() > 0) {
134 }
135 // code-verify on
136 } catch (const std::exception& e) {
137 qWarning() << "[FrameConsumer] Exception during flush:" << e.what();
138 } catch (...) {
139 qWarning() << "[FrameConsumer] Unknown exception during flush";
140 }
141 }
142
143protected:
144 virtual void processItems(const std::vector<T>& items) = 0;

Callers 12

sendCommandMethod · 0.45
writeFrameMethod · 0.45
sendInitFrameMethod · 0.45
processInputBufferMethod · 0.45
printReportMethod · 0.45
processItemsMethod · 0.45
disconnectSocketMethod · 0.45
processItemsMethod · 0.45
startMethod · 0.45
stopMethod · 0.45
_renderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected