Close the Heap and signals condition variables that may be waiting to pop items from the heap.
()
| 130 | // Close the Heap and signals condition variables that may be waiting to pop |
| 131 | // items from the heap. |
| 132 | func (h *Heap) Close() { |
| 133 | h.lock.Lock() |
| 134 | defer h.lock.Unlock() |
| 135 | h.closed = true |
| 136 | h.cond.Broadcast() |
| 137 | } |
| 138 | |
| 139 | // Add inserts an item, and puts it in the queue. The item is updated if it |
| 140 | // already exists. |
no outgoing calls