summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2010-01-12 12:09:31 (GMT)
committerMartin Smith <msmith@trolltech.com>2010-01-12 12:09:31 (GMT)
commit4da15757269feb872432c43a3516a1349d6dcf39 (patch)
treeeeb745d1cf50d684cfccdbcb9ac5f21fd17e207d /doc
parente1e67e84b223b36a01d767c163de730702057eb8 (diff)
downloadQt-4da15757269feb872432c43a3516a1349d6dcf39.zip
Qt-4da15757269feb872432c43a3516a1349d6dcf39.tar.gz
Qt-4da15757269feb872432c43a3516a1349d6dcf39.tar.bz2
doc: Updated the descriptions of the connection types.
Replaced the ambiguous "delivered" with the explanation that the blocking queued connection type blocks the emitter's thread until the slot finishes executing in the receiver's thread. Task-number: QTBUG-6392
Diffstat (limited to 'doc')
-rw-r--r--doc/src/frameworks-technologies/threads.qdoc45
1 files changed, 29 insertions, 16 deletions
diff --git a/doc/src/frameworks-technologies/threads.qdoc b/doc/src/frameworks-technologies/threads.qdoc
index 10da936..fd6bebb 100644
--- a/doc/src/frameworks-technologies/threads.qdoc
+++ b/doc/src/frameworks-technologies/threads.qdoc
@@ -472,24 +472,37 @@
\section1 Signals and Slots Across Threads
- Qt supports three types of signal-slot connections:
+ Qt supports these signal-slot connection types:
\list
- \o With \l{Qt::DirectConnection}{direct connections}, the
- slot gets called immediately when the signal is emitted. The
- slot is executed in the thread that emitted the signal (which
- is not necessarily the thread where the receiver object
- lives).
-
- \o With \l{Qt::QueuedConnection}{queued connections}, the
- slot is invoked when control returns to the event loop of the
- thread to which the object belongs. The slot is executed in
- the thread where the receiver object lives.
-
- \o With \l{Qt::AutoConnection}{auto connections} (the default),
- the behavior is the same as with direct connections if
- the signal is emitted in the thread where the receiver lives;
- otherwise, the behavior is that of a queued connection.
+
+ \o \l{Qt::AutoConnection}{Auto Connection} (default) The behavior
+ is the same as the Direct Connection, if the emitter and
+ receiver are in the same thread. The behavior is the same as
+ the Queued Connection, if the emitter and receiver are in
+ different threads.
+
+ \o \l{Qt::DirectConnection}{Direct Connection} The slot is invoked
+ immediately, when the signal is emitted. The slot is executed
+ in the emitter's thread, which is not necessarily the
+ receiver's thread.
+
+ \o \l{Qt::QueuedConnection}{Queued Connection} The slot is invoked
+ when control returns to the event loop of the receiver's
+ thread. The slot is executed in the receiver's thread.
+
+ \o \l{Qt::BlockingQueuedConnection}{Blocking Queued Connection}
+ The slot is invoked as for the Queued Connection, except the
+ current thread blocks until the slot returns. \note Using this
+ type to connect objects in the same thread will cause deadlock.
+
+ \o \l{Qt::UniqueConnection}{Unique Connection} The behavior is the
+ same as the Auto Connection, but the connection is made only if
+ it does not duplicate an existing connection. i.e., if the same
+ signal is already connected to the same slot for the same pair
+ of objects, then the connection is not made and connect()
+ returns false.
+
\endlist
The connection type can be specified by passing an additional