2
0
mirror of synced 2025-02-23 14:18:13 +00:00

Improve Torrent.DownloadPieces documentation

Was mentioned in Gitter.
This commit is contained in:
Matt Joiner 2018-05-18 14:06:28 +10:00
parent 15b828515e
commit a1fabaf2f8

3
t.go
View File

@ -149,6 +149,9 @@ func (t *Torrent) deleteReader(r *reader) {
t.readersChanged()
}
// Raise the priorities of pieces in the range [begin, end) to at least Normal
// priority. Piece indexes are not the same as bytes. Requires that the info
// has been obtained, see Torrent.Info and Torrent.GotInfo.
func (t *Torrent) DownloadPieces(begin, end int) {
t.cl.mu.Lock()
defer t.cl.mu.Unlock()