diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-09-16 12:35:51 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-09-16 19:27:09 +0200 |
commit | fe7249afb813b7c8bb14ba80755ef7203c499214 (patch) | |
tree | dd971532d7f3748fcc4ae97d228bbf41af84084a /src/qml/qml/ftw | |
parent | e5fe1e93c73e85c9a4c35388f48aa54924d82c27 (diff) |
QQmlThread: add some internal documentation
Change-Id: Ibd7c1236e88681965088d40dd3cc7f80e09e49b6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/ftw')
-rw-r--r-- | src/qml/qml/ftw/qqmlthread.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/qml/qml/ftw/qqmlthread.cpp b/src/qml/qml/ftw/qqmlthread.cpp index 2fc3fe1c38..6a471bcd00 100644 --- a/src/qml/qml/ftw/qqmlthread.cpp +++ b/src/qml/qml/ftw/qqmlthread.cpp @@ -191,6 +191,10 @@ QQmlThread::~QQmlThread() delete d; } +/*! + \internal + Starts the actual worker thread. + */ void QQmlThread::startup() { d->lock(); @@ -304,6 +308,13 @@ void QQmlThread::internalCallMethodInThread(Message *message) d->unlock(); } +/*! + \internal + \note This method needs to run in the worker/QQmlThread + + This runs \a message in the main thread, and blocks the + worker thread until the call has completed + */ void QQmlThread::internalCallMethodInMain(Message *message) { #if !QT_CONFIG(thread) @@ -367,6 +378,16 @@ void QQmlThread::internalPostMethodToMain(Message *message) d->unlock(); } +/*! + \internal + \note This method must be called in the main thread + + A call to this method will either: + - run a message requested to run synchronously on the main thread if there is one + (and return afterrwards), + - wait for the worker thread to notify it if the worker thread has pending work, + - or simply return if neither of the conditions above hold + */ void QQmlThread::waitForNextMessage() { #if QT_CONFIG(thread) |