"time"
"unsafe"
+ "github.com/RoaringBitmap/roaring"
"github.com/anacrolix/missinggo/v2/bitmap"
"github.com/anacrolix/chansync"
return false
}
more := true
- current.Requests.Iterate(func(req uint32) bool {
- if !next.Requests.Contains(req) {
- more = p.cancel(req)
- return more
- }
- return true
+ cancel := roaring.AndNot(¤t.Requests, &next.Requests)
+ cancel.Iterate(func(req uint32) bool {
+ more = p.cancel(req)
+ return more
})
if !more {
return false