Event Queue Size

Hello,

Is it possible to limit the size of the Event Queue?
I have a Position handler that is called for every new sample. But it cannot always process the data as fast as it samples, so I end up with a very long queue. I would like to just discard the new sample if it haven’t finished processing the old one.
Any suggestion on how to do that?

Thank you,
Caio Porto