PDA

View Full Version : How to immediately post an event/signal to another thread



mortoray
8th December 2010, 13:33
When I emit an event that is destined for another thread it appears that this event is not posted until the current thread returns to the event loop. I need a way to have this event been immediately propagated to the other thread.

I don't need to use signals to do this. I'm fine with another technique. What first came to mind as a QWaitCondition, but then the target thread can't have a message loop, since there is no way to wait on either the condition or the event loop.

Added after 55 minutes:

With some testing it does appear that the signals are immediately posted to the event loop in the other thread. Thus signals are likely a good enough option. The delay I'm experiencing is coming from another QT module (Phonon).