Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qthread_p.h>
Public Member Functions | |
QThreadData (int initialRefCount=1) | |
~QThreadData () | |
void | ref () |
void | deref () |
bool | hasEventDispatcher () const |
QAbstractEventDispatcher * | createEventDispatcher () |
QAbstractEventDispatcher * | ensureEventDispatcher () |
bool | canWaitLocked () |
Static Public Member Functions | |
static Q_AUTOTEST_EXPORT QThreadData * | current (bool createIfNecessary=true) |
static void | clearCurrentThreadData () |
static QThreadData * | get2 (QThread *thread) |
Public Attributes | |
int | loopLevel |
int | scopeLevel |
QStack< QEventLoop * > | eventLoops |
QPostEventList | postEventList |
QAtomicPointer< QThread > | thread |
QAtomicPointer< void > | threadId |
QAtomicPointer< QAbstractEventDispatcher > | eventDispatcher |
QList< void * > | tls |
bool | quitNow |
bool | canWait |
bool | isAdopted |
bool | requiresCoreApplication |
Definition at line 283 of file qthread_p.h.
QThreadData::QThreadData | ( | int | initialRefCount = 1 | ) |
Definition at line 48 of file qthread.cpp.
Referenced by current().
QThreadData::~QThreadData | ( | ) |
Definition at line 56 of file qthread.cpp.
References QList< T >::at(), clearCurrentThreadData(), QObject::event(), i, QBasicAtomicPointer< X >::loadAcquire(), QBasicAtomicInteger< T >::loadRelaxed(), postEventList, Q_ASSERT, QPostEvent::receiver, QList< T >::size(), QBasicAtomicPointer< X >::storeRelease(), QCoreApplicationPrivate::theMainThread, QCoreApplicationPrivate::theMainThreadId, thread, and threadId.
|
inline |
Definition at line 308 of file qthread_p.h.
References canWait, QPostEventList::mutex, and postEventList.
|
static |
Definition at line 1103 of file qthread.cpp.
Referenced by ~QThreadData().
QAbstractEventDispatcher * QThreadData::createEventDispatcher | ( | ) |
Definition at line 113 of file qthread.cpp.
References QThreadPrivate::createEventDispatcher(), eventDispatcher, and QBasicAtomicPointer< X >::storeRelease().
Referenced by ensureEventDispatcher().
|
static |
Definition at line 1087 of file qthread.cpp.
References QThreadData(), QCoreApplicationPrivate::theMainThread, and QCoreApplicationPrivate::theMainThreadId.
Referenced by QObject::QObject(), QWindowsRemovableDriveListener::addPath(), QCoreApplicationPrivate::createEventDispatcher(), QThread::currentThread(), QObject::deleteLater(), QCoreApplication::exec(), QAbstractEventDispatcher::instance(), QCoreApplicationPrivate::lockThreadPostEventList(), QObject::moveToThread(), postEventSourcePrepare(), QCoreApplication::processEvents(), QCoreApplication::processEvents(), qGlobalPostedEventsCount(), QCoreApplicationPrivate::removePostedEvent(), QCoreApplication::sendPostedEvents(), and QCoreApplicationPrivate::threadRequiresCoreApplication().
void QThreadData::deref | ( | ) |
Definition at line 105 of file qthread.cpp.
References QBasicAtomicInteger< T >::deref().
Referenced by QObject::moveToThread(), QObjectPrivate::ConnectionData::removeConnection(), and QObjectPrivate::setThreadData_helper().
|
inline |
Definition at line 300 of file qthread_p.h.
References createEventDispatcher(), eventDispatcher, QBasicAtomicPointer< X >::loadRelaxed(), and Q_LIKELY.
Referenced by QWindowsRemovableDriveListener::addPath().
|
inlinestatic |
Definition at line 291 of file qthread_p.h.
References Q_ASSERT_X, and thread.
Referenced by QCoreApplicationData::~QCoreApplicationData(), QtWaylandClient::QWaylandWindow::createDecoration(), QtWaylandClient::QWaylandWindow::doApplyConfigure(), QAbstractEventDispatcher::instance(), QMetaMethodInvoker::invokeImpl(), QObject::moveToThread(), and QtWaylandClient::QWaylandWindow::setCanResize().
|
inline |
Definition at line 297 of file qthread_p.h.
References eventDispatcher, and QBasicAtomicPointer< X >::loadRelaxed().
void QThreadData::ref | ( | ) |
Definition at line 97 of file qthread.cpp.
References QBasicAtomicInteger< T >::loadRelaxed(), Q_ASSERT, QBasicAtomicInteger< T >::ref(), and void.
Referenced by QMetaObjectPrivate::connect(), QObjectPrivate::connectImpl(), and QObject::moveToThread().
bool QThreadData::canWait |
Definition at line 329 of file qthread_p.h.
Referenced by canWaitLocked().
QAtomicPointer<QAbstractEventDispatcher> QThreadData::eventDispatcher |
Definition at line 325 of file qthread_p.h.
Referenced by createEventDispatcher(), ensureEventDispatcher(), and hasEventDispatcher().
QStack<QEventLoop *> QThreadData::eventLoops |
Definition at line 321 of file qthread_p.h.
Referenced by QCoreApplication::exec().
bool QThreadData::isAdopted |
Definition at line 330 of file qthread_p.h.
int QThreadData::loopLevel |
Definition at line 318 of file qthread_p.h.
QPostEventList QThreadData::postEventList |
Definition at line 322 of file qthread_p.h.
Referenced by ~QThreadData(), canWaitLocked(), QCoreApplicationPrivate::lockThreadPostEventList(), QObject::moveToThread(), QCoreApplication::removePostedEvents(), and QObjectPrivate::setThreadData_helper().
bool QThreadData::quitNow |
Definition at line 328 of file qthread_p.h.
Referenced by QCoreApplication::exec(), QCoreApplicationPrivate::execCleanup(), and QCoreApplication::exit().
bool QThreadData::requiresCoreApplication |
Definition at line 331 of file qthread_p.h.
int QThreadData::scopeLevel |
Definition at line 319 of file qthread_p.h.
Referenced by QScopedScopeLevelCounter::QScopedScopeLevelCounter(), and QScopedScopeLevelCounter::~QScopedScopeLevelCounter().
QAtomicPointer<QThread> QThreadData::thread |
Definition at line 323 of file qthread_p.h.
Referenced by QScopedScopeLevelCounter::QScopedScopeLevelCounter(), QScopedScopeLevelCounter::~QScopedScopeLevelCounter(), ~QThreadData(), get2(), and QObject::moveToThread().
QAtomicPointer<void> QThreadData::threadId |
Definition at line 324 of file qthread_p.h.
Referenced by ~QThreadData(), and doActivate().
Definition at line 326 of file qthread_p.h.