[Qt-interest] Qt signaling smarts...
Will Rutherdale (rutherw)
rutherw at cisco.com
Tue Nov 24 20:00:39 CET 2009
A simpler way to avoid marshalling of big data between threads is to
subclass from QEvent. QCoreApplicatin::postEvent() will then put the
event object into the event queue for the thread to which the object
belongs. You handle the incoming event by over-riding QObject::event().
-Will
> -----Original Message-----
> From: qt-interest-bounces at trolltech.com
> [mailto:qt-interest-bounces at trolltech.com] On Behalf Of KC Jones
> Sent: 24 November 2009 13:51
> To: BRM
> Cc: qt-interest
> Subject: Re: [Qt-interest] Qt signaling smarts...
>
> > In my actual program, thread1 is going to be generating a
> lot of data that may go to multiple instances of thread2;
> > and I would rather not have to have all that data get
> crammed through program's main thread and main event loop,
> > but instead go directly to the thread2's event loop.
>
> I have nothing to add re: intra thread signaling, but I will point out
> that signal/slot calls, especially queued, imply copying all of the
> passed data. So if you have a large volume of data you might need to
> transmit it through some other mechanism (file, socket, etc.) and use
> the signaling to marshal that resource between threads.
>
> But that's not really the advice what you were asking for...
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list