// Push adds a new event to the heap with a given rank. Previously queued
// events with same rank will be out first.
Push adds a new event to the heap with a given rank. Previously queued
events with same rank will be out first.
// Push adds a new event to the heap with a given rank . Previously queued // events with same rank will be out first .
func (eq *EventQueue) Push(ev Event, rank int) {
	evr := event{Event: ev, Rank: rank, Idx: eq.Max}
	eq.Max++
	heap.Push(eq.Queue, evr)
	if eq.Max+1 < 0 {
		eq.Filter(func(ev Event) bool { return true })
	}
}
func ( eq * EventQueue ) Push ( ev Event , rank int ) { evr := event { Event : ev , Rank : rank , Idx : eq . Max } eq . Max ++ heap . Push ( eq . Queue , evr ) if eq . Max + 1 < 0 { eq . Filter ( func ( ev Event ) bool { return true } ) } }
Push adds a new event to the heap with a given rank.
Push adds a new event to the heap with a given rank .
// should not happen in practical situations