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

Add doc comment for Torrent.BytesMissing

Fixes https://github.com/anacrolix/torrent/issues/828.
This commit is contained in:
Matt Joiner 2023-05-19 14:18:24 +10:00
parent 8ac9ea890e
commit 56c8b396f5
No known key found for this signature in database
GPG Key ID: 6B990B8185E7F782

View File

@ -830,7 +830,10 @@ func (t *Torrent) newMetaInfo() metainfo.MetaInfo {
}
}
// Get bytes left
// Returns a count of bytes that are not complete in storage, and not pending being written to
// storage. This value is from the perspective of the download manager, and may not agree with the
// actual state in storage. If you want read data synchronously you should use a Reader. See
// https://github.com/anacrolix/torrent/issues/828.
func (t *Torrent) BytesMissing() (n int64) {
t.cl.rLock()
n = t.bytesMissingLocked()