~ubuntu-branches/ubuntu/gutsy/amarok/gutsy-updates

« back to all changes in this revision

Viewing changes to amarok/src/threadweaver.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2006-11-03 23:57:33 UTC
  • mfrom: (1.31.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061103235733-a41oyfz4mzienqin
Tags: 2:1.4.4-0ubuntu2
Add debian/kubuntu-media-amarok and
debian amarok_play_audiocd.desktop for good KDE integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#include "collectiondb.h"
19
19
#include "amarokconfig.h"
20
20
 
21
 
using amaroK::StatusBar;
 
21
using Amarok::StatusBar;
22
22
 
23
23
volatile uint ThreadWeaver::threadIdCounter = 1; //main thread grabs zero
24
24
QMutex* ThreadWeaver::threadIdMutex = new QMutex();
46
46
        }
47
47
#endif
48
48
 
49
 
        debug() << "Waiting on thread...\n";
 
49
        if( (*it)->job() && (*it)->job()->name() )
 
50
            debug() << "Waiting on thread " << (*it)->job()->name() << "...\n";
 
51
        else
 
52
            debug() << "Waiting on thread...\n";
50
53
        (*it)->wait();
51
54
    }
52
55
}
294
297
    pthread_once( &current_thread_key_once, create_current_thread_key );
295
298
    pthread_setspecific( current_thread_key, this );
296
299
 
297
 
    m_job->m_aborted |= !m_job->doJob();
298
 
 
299
300
    if( m_job )
 
301
    {
 
302
        m_job->m_aborted |= !m_job->doJob();
300
303
        QApplication::postEvent( ThreadWeaver::instance(), m_job );
 
304
    }
301
305
 
302
306
    // almost always the thread doesn't finish until after the
303
307
    // above event is already finished processing