[Qt-interest] Qt signaling smarts...

Arnold Krille arnold at arnoldarts.de
Tue Nov 24 20:14:55 CET 2009


On Tuesday 24 November 2009 19:51:26 KC Jones wrote:
> > 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.

Or you create implicit or explicit shared data structures (hint: based on 
QSharedData and its pointers). Then you can copy the shallow frontends as you 
like (even with reference counting for free). Or point to these data 
structures inside your custom events...

Have fun,

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091124/a38c83f8/attachment.bin 


More information about the Qt-interest-old mailing list