mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-11 14:45:33 +08:00
refactor: Add asserts to check executing in worker thread
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user