23.5.1 Priority Queue - Example
- Event loop - the heart of the simulation
- It pulls the next event (smallest time) from the PQ
- Events are removed in sequence, regardless of insertion
- As each event is removed it is executed, and the memory recovered
- The loop runs until the the queue is exhausted
prev
|top
|next