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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user