how does flushing the system queue work with drawnow

4 views (last 30 days)
I'm running a callback that takes time to execute. As it is running, user inputs may be generating more callbacks (to the same function).
If there are multiple calls to the same callback in the event queue, I'd like to always only be running the newest callback and ignoring any old ones.
A call to drawnow() certainly seems to be removing most (if not all) of these events. But how is it actually working? I guess when it comes down to it, I don't really understand what "flushing the system queue" actually means.
So I guess in summary there are two questions: 1) What does "flushing the system queue" actually mean? Are all callbacks discarded? If not, which ones are kept? 2) How would I discard all callbacks except the newest one for a given function? (This may be self-evident based on the answer to #1)
Thanks, Jim

Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!