[Qt-interest] QWaitCondition prevents signals from calling slots

Jonathan Wong jhannwong at gmail.com
Tue May 19 07:15:08 CEST 2009


I do understand that doing a loop or QWaitCondition wait defeats the event-driven paradigm. Feel
free to repeat this answer to me to confirm my understanding.

Jonathan Wong wrote:
> I'm asking this in general for now, and will furnish more detailed experimentation details if
> required later.
> 
> A QObject waits on a QWaitCondition
> Same QObject waits for a signal call to its slot, say wakeWaiter.
> Slot wakeWaiter will wakeOne on the QWaitCondition.
> 
> It appears that the signal never reached wakeWaiter, no matter where the signal was emitted from
> (this thread or another thread). I gather that calls to slots are done in the slots' thread, not
> the signalers' thread.
> 
> Seems that we should not wait on a QWaitCondition if we want our slots to be alive and responding
> to signals.
> 
> Is that true?
> 




More information about the Qt-interest-old mailing list