Skip to content

Commit

Permalink
pqm/pqmdatalogger: Wait for the file writing thread to finish.
Browse files Browse the repository at this point in the history
Signed-off-by: andreidanila1 <[email protected]>
  • Loading branch information
andreidanila1 committed Nov 13, 2024
1 parent a1808ac commit 7797088
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion plugins/pqm/src/pqmdatalogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,19 @@ using namespace scopy::pqm;
PqmDataLogger::PqmDataLogger(QObject *parent)
: QObject(parent)
, m_crtInstr(None)
, m_writeFw(nullptr)
{
m_writeFw = new QFutureWatcher<void>(this);
}

PqmDataLogger::~PqmDataLogger() {}
PqmDataLogger::~PqmDataLogger()
{
if(m_writeFw) {
m_writeFw->waitForFinished();
m_writeFw->deleteLater();
m_writeFw = nullptr;
}
}

void PqmDataLogger::setChnlsName(QStringList chnlsName) { m_chnlsName = chnlsName; }

Expand Down

0 comments on commit 7797088

Please sign in to comment.