Event queue implementation