Skip to content

Commit

Permalink
heap_manager: better names for break labels
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauerster committed Jan 3, 2025
1 parent dc1bd70 commit fde6250
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions heap_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,27 @@ func (m heapManager) run() {
syncWidth(aMatrix, drop)
case h_iter:
data := req.data.(iterData)
drop_iter:
loop: // unordered iteration
for _, b := range bHeap {
select {
case data.iter <- b:
case <-data.drop:
data.iterPop = nil
break drop_iter
break loop
}
}
close(data.iter)
if data.iterPop == nil {
break
}
drop_drain:
loop_pop: // ordered iteration
for bHeap.Len() != 0 {
bar := heap.Pop(&bHeap).(*Bar)
select {
case data.iterPop <- bar:
case <-data.drop:
heap.Push(&bHeap, bar)
break drop_drain
break loop_pop
}
}
close(data.iterPop)
Expand Down

0 comments on commit fde6250

Please sign in to comment.