From a1fabaf2f88bc9e7e7217b53666329bf50750d9a Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 18 May 2018 14:06:28 +1000 Subject: [PATCH] Improve Torrent.DownloadPieces documentation Was mentioned in Gitter. --- t.go | 3 +++ 1 file changed, 3 insertions(+) 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() -- 2.50.0