PDA

View Full Version : cost of emitting signal



quickNitin
29th November 2006, 09:39
greetings.
i am in knowing what will cost of emitting a signal. SomeWhere in one post i read signal-slo connects cost is comaparable to virtaul functions.
Why i am intersted here is because i want to depending on a condition i want to emit a signal .If checkign a bool cost more than emit then i think there is no point in doing so.

quickNitin

wysota
29th November 2006, 09:53
Emitting a signal is more expensive than checking a boolean.

The least you have to do to emit a signal is to find a list of slots connected to them (Qt3 and Qt4), check what thread owns them (Qt4) and call an appropriate method with appropriate arguments (Qt3 and Qt4) or queue the connection as an event after serialising slots' arguments (Qt4).