refactor: Add asserts to check executing in worker thread

This commit is contained in:
Lars Toenning
2025-06-09 14:21:45 +02:00
parent 0d1e8a0783
commit b9cdccec05
4 changed files with 4 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ namespace swift::core
void CThreadedReaderPeriodic::startReader()
{
Q_ASSERT_X(hasStarted(), Q_FUNC_INFO, "Thread was not started yet!");
Q_ASSERT(m_initialTime > 0);
QTimer::singleShot(m_initialTime, this, [=] { this->doWork(); });
}