1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-13 09:34:53 +02:00

* Increment counter inside mutex-lock.

This commit is contained in:
Christian Muehlhaeuser
2011-01-19 09:00:57 +01:00
parent e335a9f60f
commit 61578e4bbe

View File

@@ -40,10 +40,9 @@ DatabaseWorker::run()
void
DatabaseWorker::enqueue( const QSharedPointer<DatabaseCommand>& cmd )
{
m_outstanding++;
QMutexLocker lock( &m_mut );
m_commands << cmd;
m_outstanding++;
if ( m_outstanding == 1 )
QTimer::singleShot( 0, this, SLOT( doWork() ) );