1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-07 14:46:33 +02:00

Wait for the first DatabaseWorker to be ready to declare Database as ready

This commit is contained in:
Uwe L. Korn
2014-10-12 16:33:57 +01:00
parent cb373ca65c
commit a95e6aa4e1

View File

@@ -306,6 +306,14 @@ Database::markAsReady()
return;
tLog() << Q_FUNC_INFO << "Database is ready now!";
// In addition to a ready index, we also need at leat one workerThread to
// be ready so that we can queue DatabaseCommands.
if ( m_workerThreads.size() > 0 && m_workerThreads.first() )
{
m_workerThreads.first()->waitForEventLoopStart();
}
m_ready = true;
emit ready();
}