[Qt-interest] Confused by dev-net wiki article: inter-thread sig-slot connections

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Fri Jun 17 16:05:08 CEST 2011


> I've pointed out several times in that document as well: the _current_
> thread (not the one of the sender object) is compared with the
> receiver's thread:
>
> Quoting that page:
>
>> In every case, keep in mind the thread the emitting object is living in has no importance at all! In case of an automatic connection, Qt looks at the thread that invoked the signal and compares it with the thread the receiver is living in to determine which connection type it has to use.
>
> Also, it has been fixed in the Qt docs:
>
> http://doc.qt.nokia.com/4.7/threads-qobject.html
>
>> # Auto Connection (default) If the signal is emitted in the thread which the receiving object has affinity then the behavior is the same as the Direct Connection. Otherwise, the behavior is the same as the Queued Connection."

Got it. So the sender's "thread affinity" has no consequence.

Thanks,
-mandeep

>
> --
> Giuseppe D'Angelo
>



More information about the Qt-interest-old mailing list