IsClosed returns true if the queue is closed.
()
| 300 | |
| 301 | // IsClosed returns true if the queue is closed. |
| 302 | func (h *Heap) IsClosed() bool { |
| 303 | h.lock.RLock() |
| 304 | defer h.lock.RUnlock() |
| 305 | if h.closed { |
| 306 | return true |
| 307 | } |
| 308 | return false |
| 309 | } |
| 310 | |
| 311 | // NewHeap returns a Heap which can be used to queue up items to process. |
| 312 | func NewHeap(keyFn KeyFunc, lessFn LessFunc) *Heap { |
no outgoing calls