mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-14 01:54:07 +02:00
* Increment counter inside mutex-lock.
This commit is contained in:
@@ -40,10 +40,9 @@ DatabaseWorker::run()
|
|||||||
void
|
void
|
||||||
DatabaseWorker::enqueue( const QSharedPointer<DatabaseCommand>& cmd )
|
DatabaseWorker::enqueue( const QSharedPointer<DatabaseCommand>& cmd )
|
||||||
{
|
{
|
||||||
m_outstanding++;
|
|
||||||
|
|
||||||
QMutexLocker lock( &m_mut );
|
QMutexLocker lock( &m_mut );
|
||||||
m_commands << cmd;
|
m_commands << cmd;
|
||||||
|
m_outstanding++;
|
||||||
|
|
||||||
if ( m_outstanding == 1 )
|
if ( m_outstanding == 1 )
|
||||||
QTimer::singleShot( 0, this, SLOT( doWork() ) );
|
QTimer::singleShot( 0, this, SLOT( doWork() ) );
|
||||||
|
Reference in New Issue
Block a user