diff --git a/heap_manager.go b/heap_manager.go index 670f276..c8a2802 100644 --- a/heap_manager.go +++ b/heap_manager.go @@ -35,8 +35,7 @@ func (m heapManager) run() { var bHeap priorityQueue - var pMatrix map[int][]chan int - var aMatrix map[int][]chan int + var pMatrix, aMatrix map[int][]chan int var l int var sync bool diff --git a/progress.go b/progress.go index 2e38a15..fc32f9e 100644 --- a/progress.go +++ b/progress.go @@ -23,13 +23,12 @@ // Progress represents a container that renders one or more progress bars. type Progress struct { - uwg *sync.WaitGroup - bwg *sync.WaitGroup - operateState chan func(*pState) - interceptIO chan func(io.Writer) - done chan struct{} - shutdown chan struct{} - cancel func() + uwg *sync.WaitGroup + bwg *sync.WaitGroup + operateState chan func(*pState) + interceptIO chan func(io.Writer) + done, shutdown chan struct{} + cancel func() } // pState holds bars in its priorityQueue, it gets passed to (*Progress).serve monitor goroutine.