clarify documentation around torrent_handle::have_piece() and piece_finished_alert

This commit is contained in:
arvidn 2019-11-28 14:52:40 +01:00 committed by Arvid Norberg
parent 78aefcc806
commit b108b1d044
2 changed files with 5 additions and 2 deletions

View File

@ -868,6 +868,9 @@ TORRENT_VERSION_NAMESPACE_2
// this alert is posted every time a piece completes downloading
// and passes the hash check. This alert derives from torrent_alert
// which contains the torrent_handle to the torrent the piece belongs to.
// Note that being downloaded and passing the hash check may happen before
// the piece is also fully flushed to disk. So torrent_handle::have_piece()
// may still return false
struct TORRENT_EXPORT piece_finished_alert final : torrent_alert
{
// internal

View File

@ -287,8 +287,8 @@ namespace aux {
// guaranteed to finish in the same order as you initiated them.
void read_piece(piece_index_t piece) const;
// Returns true if this piece has been completely downloaded, and false
// otherwise.
// Returns true if this piece has been completely downloaded and written
// to disk, and false otherwise.
bool have_piece(piece_index_t piece) const;
#if TORRENT_ABI_VERSION == 1