From: Matt Joiner Date: Fri, 18 May 2018 04:06:28 +0000 (+1000) Subject: Improve Torrent.DownloadPieces documentation X-Git-Tag: v1.0.0~138 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=a1fabaf2f88bc9e7e7217b53666329bf50750d9a;p=btrtrc.git Improve Torrent.DownloadPieces documentation Was mentioned in Gitter. --- diff --git a/t.go b/t.go index ee78b183..516a074a 100644 --- a/t.go +++ b/t.go @@ -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()