torrent.go | 2 ++ diff --git a/torrent.go b/torrent.go index eeab1a63f36b66618a9f750a17854f051766a543..7d9c59b67d581d2c59dceef1697dde10e725ed89 100644 --- a/torrent.go +++ b/torrent.go @@ -917,6 +917,8 @@ } // Returns true if all iterations complete without breaking. func (t *torrent) forReaderOffsetPieces(f func(begin, end int) (more bool)) (all bool) { + // There's an oppurtunity here to build a map of beginning pieces, and a + // bitmap of the rest. I wonder if it's worth the allocation overhead. for r := range t.readers { r.mu.Lock() pos, readahead := r.pos, r.readahead