Codebase list golang-github-vbauerster-mpb / be463f6
heapManager h_state case Vladimir Bauer 3 years ago
1 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1313 h_iter
1414 h_drain
1515 h_fix
16 h_state
1617 h_end
1718 )
1819
8586 close(data.iter)
8687 case h_fix:
8788 heap.Fix(&bHeap, req.data.(int))
89 case h_state:
90 ch := req.data.(chan<- bool)
91 ch <- sync || l != bHeap.Len()
8892 case h_end:
8993 ch := req.data.(chan<- interface{})
9094 if ch != nil {
120124 m <- heapRequest{cmd: h_push, data: index}
121125 }
122126
127 func (m heapManager) state(ch chan<- bool) {
128 m <- heapRequest{cmd: h_state, data: ch}
129 }
130
123131 func (m heapManager) end(ch chan<- interface{}) {
124132 m <- heapRequest{cmd: h_end, data: ch}
125133 }