yield an event with generators