* @brief Drains the worker's backlog without stopping it; the worker stays reusable. Skips the * flush at exit because BlockingQueuedConnection needs a live event loop on both ends. */
| 264 | * flush at exit because BlockingQueuedConnection needs a live event loop on both ends. |
| 265 | */ |
| 266 | void flushWorker() |
| 267 | { |
| 268 | if (!m_worker || !m_workerThread.isRunning()) |
| 269 | return; |
| 270 | |
| 271 | if (QCoreApplication::instance()) |
| 272 | QMetaObject::invokeMethod( |
| 273 | m_worker, &FrameConsumerWorkerBase::flush, Qt::BlockingQueuedConnection); |
| 274 | } |
| 275 | |
| 276 | /** |
| 277 | * @brief Flushes and stops the worker thread. Idempotent; call before QApplication teardown. The |