[Interest] Signal and Slot mechansim in Qt4.8.x
Till Oliver Knoll
till.oliver.knoll at gmail.com
Fri Aug 8 13:53:23 CEST 2014
Am 08.08.2014 um 10:39 schrieb Ramakanthreddy Kesireddy <Ramakanthreddy.Kesireddy at techmahindra.com>:
> If multiple signals are emitted once, I would like to know if framework would take care of slots execution in parallel or in sequential order.
For "direct connections" slots are always executed in the same thread from where the signal originated.
As Bo already pointed out if you have several slots - directly - connected to a given signal, then they are sequentially processed - in /any/ (undefined/undocumented) order!
If on the other hand those slots are indirectly connected (aka "Queued Connection") then the slots are processed in their respective threads.
So if you have N threads and each is connecting a distinct slot to a given signal with a queued connection (implying that each thread is running its own event queue), when this signal fires then the N slots execute in parallel (as far as the thread scheduler allows).
Read more in the Qt docs, "Signals and Slots Across Threads".
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest