How to clean signals in thread.
-
Yep, sounds strange, let me explain.
I know that if I connect signal and slot between threads, it means that by default first thread will post some event to receiver thread event queue.
All i want is to know is there any king of mechanism i can remove all events from thread's event queue, generated by particular emit signal in other thread. -
Hi,
AFAIK, it's not possible.
Out of curiosity, why would you need that feature ?
-
Yep, sounds strange, let me explain.
I know that if I connect signal and slot between threads, it means that by default first thread will post some event to receiver thread event queue.
All i want is to know is there any king of mechanism i can remove all events from thread's event queue, generated by particular emit signal in other thread. -
@SGaist i got system that based on qt plugin system.
Each plugin works asynchronously in his thread.
I am using signals as communication mechanism between plugins.
Some event from one plugin is received in second plugin and changes internal state of the second plugin.
But while i processing changing internal state, some signals already arrived to second plugin. I don't need them in state i had just switched to. -
Then why not just ignore them if you're in a given state ?
-
What do you mean by "no difference" ?