core/bloombits : add quit channel select

This commit is contained in:
ucwong 2020-04-09 11:01:27 +00:00
parent 3ed5d5500f
commit 9865f518da

View file

@ -586,6 +586,8 @@ func (s *MatcherSession) AllocateSections(bit uint, count int) []uint64 {
// bit index to be injected into the processing pipeline.
func (s *MatcherSession) DeliverSections(bit uint, sections []uint64, bitsets [][]byte) {
select {
case <-s.quit:
return
case s.matcher.deliveries <- &Retrieval{Bit: bit, Sections: sections, Bitsets: bitsets}:
}
}