how does flushing the system queue work with drawnow

8 次查看(过去 30 天)
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Model, Block, and Port Callbacks 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by