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.
AFAIK, it's not possible.
Out of curiosity, why would you need that feature ?
Probably you could hack around with installing an event filter and intercepting the
QEvent::MetaCallevents, but(!) you shouldn't do that in the first place.
@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 ?
@SGaist it is a good option.
but for now there is no difference between signals regardless of the state
What do you mean by "no difference" ?