PDA

View Full Version : Any examples of receiving slots in threads?



draftpunk
9th January 2010, 17:42
Does anyone know of any complete examples of threads receiving slots? I've read the various posts about it in this forum (which have been extremely helpful), but even after applying these techniques, it's just not working. I'm using a proxy object, created by the thread object, and can actually receive a "start" signal from the main thread, but later, during the thread's execution, signals sent from the main thread do not get through. An example of how it's supposed to be done would be very helpful.

Thanks in advance.
draftpunk

squidge
9th January 2010, 18:13
It's not really any different from any other object. Thats how it was designed. If the signals are not getting through then the event loop is not being run. Ensure there are no blocking actions in the thread that can block the event queue. For example, long computations & Sleep.

draftpunk
9th January 2010, 19:21
Thanks. I had called exec() in the thread, but I was in the middle of a long processing function. Your response made me realize that my processing function was starving the event loop. Looks like I have some restructuring to do. Thanks again.

draftpunk