Skip to main content

Module hash_pool

Module hash_pool 

Source
Expand description

Parallel SHA-1/SHA-256 piece-hashing pool. Dedicated thread pool for CPU-bound piece hash verification (M96).

Workers receive HashJobs via tokio::sync::mpsc (bridged to std::sync::mpsc), compute SHA1 hashes with catch_unwind panic recovery, and send results back via per-torrent tokio::sync::mpsc::Sender carried in each job.

Structs§

HashPool
A thread pool dedicated to CPU-bound piece hash verification.
HashResult
Result of a hash verification.

Enums§

HashJob
Job submitted to the hash pool.