Add while-loop to EventBarrier.arrive()