Qt 4.8
|
#include <qthreadpool_p.h>
Public Functions | |
int | activeThreadCount () const |
void | enqueueTask (QRunnable *task, int priority=0) |
QThreadPoolPrivate () | |
void | reset () |
Makes all threads exit, waits for each thread to exit and deletes it. More... | |
bool | startFrontRunnable () |
Pulls a runnable from the front queue and runs it in the current thread. More... | |
void | startThread (QRunnable *runnable=0) |
void | stealRunnable (QRunnable *) |
Searches for runnable in the queue, removes it from the queue and runs it if found. More... | |
bool | tooManyThreadsActive () const |
bool | tryStart (QRunnable *task) |
void | tryToStartMoreThreads () |
bool | waitForDone (int msecs=-1) |
Public Functions inherited from QObjectPrivate | |
void | _q_reregisterTimers (void *pointer) |
void | addConnection (int signal, Connection *c) |
void | cleanConnectionLists () |
void | connectNotify (const char *signal) |
void | deleteChildren () |
void | disconnectNotify (const char *signal) |
bool | isSender (const QObject *receiver, const char *signal) const |
bool | isSignalConnected (uint signalIdx) const |
Returns true if the signal with index signal_index from object sender is connected. More... | |
void | moveToThread_helper () |
QObjectPrivate (int version=QObjectPrivateVersion) | |
QObjectList | receiverList (const char *signal) const |
QObjectList | senderList () const |
void | setParent_helper (QObject *) |
void | setThreadData_helper (QThreadData *currentData, QThreadData *targetData) |
int | signalIndex (const char *signalName) const |
Returns the signal index used in the internal connectionLists vector. More... | |
virtual | ~QObjectPrivate () |
Public Functions inherited from QObjectData | |
virtual | ~QObjectData ()=0 |
Friends | |
class | QThreadPoolThread |
Additional Inherited Members | |
Public Types inherited from QObjectPrivate | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
Static Public Functions inherited from QObjectPrivate | |
static void | clearGuards (QObject *) |
static QObjectPrivate * | get (QObject *o) |
static void | resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender) |
static Sender * | setCurrentSender (QObject *receiver, Sender *sender) |
static void | signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result) |
Definition at line 68 of file qthreadpool_p.h.
QThreadPoolPrivate::QThreadPoolPrivate | ( | ) |
Definition at line 165 of file qthreadpool.cpp.
int QThreadPoolPrivate::activeThreadCount | ( | ) | const |
Definition at line 222 of file qthreadpool.cpp.
Referenced by tooManyThreadsActive(), and tryStart().
void QThreadPoolPrivate::enqueueTask | ( | QRunnable * | task, |
int | priority = 0 |
||
) |
Definition at line 211 of file qthreadpool.cpp.
Referenced by tryStart().
void QThreadPoolPrivate::reset | ( | ) |
Makes all threads exit, waits for each thread to exit and deletes it.
Definition at line 266 of file qthreadpool.cpp.
bool QThreadPoolPrivate::startFrontRunnable | ( | ) |
Pulls a runnable from the front queue and runs it in the current thread.
Definition at line 317 of file qthreadpool.cpp.
void QThreadPoolPrivate::startThread | ( | QRunnable * | runnable = 0 | ) |
Definition at line 246 of file qthreadpool.cpp.
Referenced by tryStart().
void QThreadPoolPrivate::stealRunnable | ( | QRunnable * | runnable | ) |
Searches for runnable in the queue, removes it from the queue and runs it if found.
Definition at line 347 of file qthreadpool.cpp.
bool QThreadPoolPrivate::tooManyThreadsActive | ( | ) | const |
bool QThreadPoolPrivate::tryStart | ( | QRunnable * | task | ) |
Definition at line 173 of file qthreadpool.cpp.
Referenced by tryToStartMoreThreads().
void QThreadPoolPrivate::tryToStartMoreThreads | ( | ) |
Definition at line 230 of file qthreadpool.cpp.
bool QThreadPoolPrivate::waitForDone | ( | int | msecs = -1 | ) |
Definition at line 293 of file qthreadpool.cpp.
|
friend |
Definition at line 71 of file qthreadpool_p.h.
Referenced by startThread().
int QThreadPoolPrivate::activeThreads |
Definition at line 100 of file qthreadpool_p.h.
Referenced by QThreadPoolThread::registerThreadInactive(), QThreadPoolThread::run(), startThread(), tryStart(), and waitForDone().
QSet<QThreadPoolThread *> QThreadPoolPrivate::allThreads |
Definition at line 90 of file qthreadpool_p.h.
Referenced by activeThreadCount(), reset(), startThread(), and tryStart().
QQueue<QThreadPoolThread *> QThreadPoolPrivate::expiredThreads |
Definition at line 92 of file qthreadpool_p.h.
Referenced by activeThreadCount(), reset(), QThreadPoolThread::run(), and tryStart().
int QThreadPoolPrivate::expiryTimeout |
Definition at line 97 of file qthreadpool_p.h.
Referenced by QThreadPoolThread::run().
bool QThreadPoolPrivate::isExiting |
Definition at line 96 of file qthreadpool_p.h.
Referenced by reset(), and QThreadPoolThread::run().
int QThreadPoolPrivate::maxThreadCount |
Definition at line 98 of file qthreadpool_p.h.
Referenced by tooManyThreadsActive(), and tryStart().
|
mutable |
Definition at line 89 of file qthreadpool_p.h.
Referenced by reset(), QThreadPoolThread::run(), startFrontRunnable(), stealRunnable(), and waitForDone().
QWaitCondition QThreadPoolPrivate::noActiveThreads |
Definition at line 94 of file qthreadpool_p.h.
Referenced by QThreadPoolThread::registerThreadInactive(), and waitForDone().
Definition at line 93 of file qthreadpool_p.h.
Referenced by enqueueTask(), QThreadPoolThread::run(), startFrontRunnable(), stealRunnable(), tryToStartMoreThreads(), and waitForDone().
int QThreadPoolPrivate::reservedThreads |
Definition at line 99 of file qthreadpool_p.h.
Referenced by activeThreadCount(), and tooManyThreadsActive().
QQueue<QThreadPoolThread *> QThreadPoolPrivate::waitingThreads |
Definition at line 91 of file qthreadpool_p.h.
Referenced by activeThreadCount(), reset(), QThreadPoolThread::run(), and tryStart().