Skip to content

Commit

Permalink
minor: set sync without if
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauerster committed Jan 5, 2025
1 parent 29e1171 commit 060c46f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions heap_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ func (m heapManager) run() {
case h_push:
data := req.data.(pushData)
heap.Push(&bHeap, data.bar)
if !sync {
sync = data.sync
}
sync = sync || data.sync
case h_sync:
if sync || len != bHeap.Len() {
pMatrix = make(map[int][]chan int)
Expand Down

0 comments on commit 060c46f

Please sign in to comment.