fix dead lock
Vladimir Bauer
3 years ago
| 44 | 44 | case h_push: |
| 45 | 45 | data := req.data.(*pushData) |
| 46 | 46 | heap.Push(&bHeap, data.bar) |
| 47 | sync = data.sync | |
| 47 | if !sync { | |
| 48 | sync = data.sync | |
| 49 | } | |
| 48 | 50 | case h_sync: |
| 49 | 51 | if sync || l != bHeap.Len() { |
| 50 | 52 | pMatrix = make(map[int][]chan int) |
| 58 | 60 | aMatrix[i] = append(aMatrix[i], ch) |
| 59 | 61 | } |
| 60 | 62 | } |
| 63 | sync = false | |
| 64 | l = bHeap.Len() | |
| 61 | 65 | } |
| 62 | l = bHeap.Len() | |
| 63 | 66 | syncWidth(pMatrix) |
| 64 | 67 | syncWidth(aMatrix) |
| 65 | 68 | case h_iter: |