[Qt-interest] Which one is faster?
donglongchao
donglongchao at 163.com
Thu Nov 19 05:33:02 CET 2009
Hi,all
I am working on an app of muti-threads and I have a question about threads.I have two threads now,one is UI thread and the other one is a working thread.So now in my working thread,I want to ask the UI thread to update some widget.There are several way to do that.
(1) Emit a signal and connect it to the slot of the widget.(2)Use postEvent (3)Use sendEvent (4)Use a QTimer with start(0,TRUE) (5)Creat a single shot timer with static single Shot.
So I want to know which one is faster?Or there is a faster way I didn't mention above?Of course,we should test them under the same situation(the sender and the receiver live in different threads).
TIA for any suggestion.
Longchao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091119/19419f9e/attachment.html
More information about the Qt-interest-old
mailing list