42 #ifndef QTHREADPOOL_P_H 43 #define QTHREADPOOL_P_H 57 #include "QtCore/qmutex.h" 58 #include "QtCore/qwaitcondition.h" 59 #include "QtCore/qset.h" 60 #include "QtCore/qqueue.h" 61 #include "private/qobject_p.h" 105 #endif // QT_NO_THREAD bool tooManyThreadsActive() const
#define QT_END_NAMESPACE
This macro expands to.
The QQueue class is a generic container that provides a queue.
The QMutex class provides access serialization between threads.
The QRunnable class is the base class for all runnable objects.
void stealRunnable(QRunnable *)
Searches for runnable in the queue, removes it from the queue and runs it if found.
The QThreadPool class manages a collection of QThreads.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QQueue< QThreadPoolThread * > expiredThreads
void reset()
Makes all threads exit, waits for each thread to exit and deletes it.
QSet< QThreadPoolThread * > allThreads
#define Q_DECLARE_PUBLIC(Class)
void tryToStartMoreThreads()
QWaitCondition noActiveThreads
bool startFrontRunnable()
Pulls a runnable from the front queue and runs it in the current thread.
int activeThreadCount() const
void enqueueTask(QRunnable *task, int priority=0)
void startThread(QRunnable *runnable=0)
QQueue< QThreadPoolThread * > waitingThreads
QList< QPair< QRunnable *, int > > queue
The QList class is a template class that provides lists.
bool tryStart(QRunnable *task)
bool waitForDone(int msecs=-1)