diff --git a/heap_manager.go b/heap_manager.go index 2ee597f..6d8169b 100644 --- a/heap_manager.go +++ b/heap_manager.go @@ -12,7 +12,7 @@ h_sync heapCmd = iota h_push h_iter - h_pop_all + h_drain h_fix h_end ) @@ -75,7 +75,7 @@ } } close(data.iter) - case h_pop_all: + case h_drain: data := req.data.(*iterData) for bHeap.Len() != 0 { select { @@ -112,9 +112,9 @@ m <- heapRequest{cmd: h_iter, data: data} } -func (m heapManager) popAll(iter chan *Bar, drop chan struct{}) { +func (m heapManager) drain(iter chan *Bar, drop chan struct{}) { data := &iterData{iter, drop} - m <- heapRequest{cmd: h_pop_all, data: data} + m <- heapRequest{cmd: h_drain, data: data} } func (m heapManager) fix(index int) { diff --git a/progress.go b/progress.go index 99f681e..0f91aab 100644 --- a/progress.go +++ b/progress.go @@ -308,7 +308,7 @@ iter := make(chan *Bar) drop := make(chan struct{}) - s.hm.popAll(iter, drop) + s.hm.drain(iter, drop) for b := range iter { frame := <-b.frameCh