hash_v1_parallel

Function hash_v1_parallel 

Source
pub fn hash_v1_parallel(
    entries: &[ManifestEntry],
    piece_length: u64,
    options: ParallelHashOptions,
    cancellation: &CancellationToken,
    progress: &impl ProgressSink,
) -> Result<V1HashResult>
Expand description

Bounded parallel v1 piece hashing with ordered collection.

A single reader preserves the logical concatenated file stream. A fixed pool of reusable piece buffers and a bounded job queue cap payload memory at (workers + queue capacity) * piece length, plus one read buffer. Worker threads and channels are scoped to this call.

ยงErrors

Returns contextual I/O errors, cancellation, invalid options, short reads, worker failures, or file metadata changes relative to the manifest snapshot.