Don't freeze the command queue
Don't freeze the command queue

Previous commit kept completed events in the command queue, so "it !=
p_events.begin()" became a wrong test to check if we were at the first
non-completed event.

I changed the logic to use a boolean variable, and now we correctly skip
already-completed queued events.

jakebolewski/clover,jakebolewski/clover,jakebolewski/clover