Imagine you click the mouse very fast, 2 times.
Without performing it on the EDT:
Input A
Input B
EDT: Event Input A (processed)
Do robot things -> Input C
ignore events with flag
EDT: Event Input B (ignored: wrong)
process events with flag (maybe here?)
EDT: Event Input C (processed or ignored: shaky)
Do robot things -> Input D ? (or not... if ignored)
process events with flag (maybe here?)
In short: it becomes very unreliable.
Without running it on the EDT:
Input A
Input B
EDT: Event Input A (processed)
EDT: add Input A to end of event-queue: ignore events with flag, then Do robot things -> Input C on EDT
EDT: add reset-ignore-flag to end of event-queue
EDT: add Input B to end of event-queue: ignore events with flag, then Do robot things -> Input D on EDT
EDT: add reset-ignore-flag to end of event-queue
< END of EDT event queue
1. ignore, robot, new event C
event C is processed here
2. reset-ignore-flag
maybe something else here, doesn't matter
3. ignore, robot, new event D
event D is processed here
4. reset-ignore-flag
>