]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Improve Torrent.DownloadPieces documentation
authorMatt Joiner <anacrolix@gmail.com>
Fri, 18 May 2018 04:06:28 +0000 (14:06 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 18 May 2018 04:06:28 +0000 (14:06 +1000)
Was mentioned in Gitter.

t.go

diff --git a/t.go b/t.go
index ee78b1839277fe1b4d614d8846d58971c6ab659d..516a074af6631bad8757cabc9157ee0984379554 100644 (file)
--- 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()