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

@@ -45,6 +45,7 @@ namespace swift::core::db
void CDatabaseReader::readInBackgroundThread(CEntityFlags::Entity entities, const QDateTime &newerThan)
{
if (!this->doWorkCheck()) { return; }
Q_ASSERT_X(hasStarted(), Q_FUNC_INFO, "Thread was not started yet!");
// we accept cached data
Q_ASSERT_X(!entities.testFlag(CEntityFlags::DbInfoObjectEntity), Q_FUNC_INFO, "Read info objects directly");