[Qt-interest] QThread Question
Donal O'Connor
donaloconnor at gmail.com
Thu Aug 6 13:33:56 CEST 2009
Thanks Andre,
I've read the documentation and indeed it is auto.
Unfort I'm running on windows mobile phone so it's a little difficult to
debug. Don't think QT Creator has a way of deploying to the phone and
running it?
Thanks.
Donal
On Thu, Aug 6, 2009 at 12:24 PM, Andre Somers <andre at familiesomers.nl>wrote:
> Hi,
>
> Donal O'Connor wrote:
> > Hi Sean,
> >
> > Ok I see but actually looking at the code, there are some instance's
> > where it is just a regular method and not a slot. Does this mean, when
> > the method is called, that it is run in the calling thread?
> Yes, normal methods called from another thread are executed in that
> calling thread's context.
> >
> > Plus, no where have specified the connection type to be Queued, I'm
> > assuming direct connection is the default and this results in the slot
> > being called in the calling thread?
> Don't assume, read the documentation instead. The default mode is Auto.
> That means that if the two objects are in the same thread, the
> connection will be direct, and if they are in different threads, it will
> be queued.
>
> But... if you want to know if that code runs in another thread, then why
> don't just test it? You can see in your process monitor what threads are
> created, or you can simply send the QObject::thread value to the debug
> output and compare it to the GUI's thread value, or...
>
> André
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090806/b34b78ee/attachment.html
More information about the Qt-interest-old
mailing list