PDA

View Full Version : collapsing frequent signals into one signal



tuli
27th November 2014, 16:40
is there any mechanism or best practice for "caching" signals? For example, if
a system emits 10,000 update() signals within one second, i would like to "cache" all of them into
one update() signal to prevent clogging.


certainly i am not the first one to encounter this 'problem'.

anda_skoa
27th November 2014, 17:04
You can use a QTimer with a short interval. Restart on every signal (or if you do that at the emitter before sending the signal), and only execute when the timer runs out.

Cheers,
_