ThreadWeaver
Go to the documentation of this file.
33 #include <QtCore/QMutex>
34 #include <QtCore/QDebug>
41 using namespace ThreadWeaver;
55 const unsigned int id;
59 static unsigned int makeId()
61 static unsigned int s_id;
62 static QMutex sm_mutex;
63 QMutexLocker l (&sm_mutex);
71 , d(new Private(parent))
87 debug(3,
"Thread::run [%u]: running.\n",
id());
91 debug(3,
"Thread::run [%u]: trying to execute the next job.\n",
id());
94 QMutexLocker l(&d->mutex); Q_UNUSED(l);
95 oldJob = d->job; d->job = 0;
98 Job* newJob = d->parent->applyForWork(
this, oldJob);
104 QMutexLocker l(&d->mutex); Q_UNUSED(l);
112 debug ( 3,
"Thread::run [%u]: exiting.\n",
id() );
117 QThread::msleep(msec);
122 QMutexLocker l(&d->mutex); Q_UNUSED(l);
124 d->job->requestAbort();
126 qDebug (
"Thread::requestAbort: not running." );
130 #include "Thread.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Mon May 5 2014 18:08:46 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.