This commit is contained in:
Igor Katson 2024-05-03 14:12:27 +01:00
parent 3769cae1ce
commit a3c4ca70fb

View file

@ -221,7 +221,8 @@ impl TorrentStateLive {
// 8MB per torrent of disk buffering.
let (disk_work_tx, mut disk_work_rx) = tokio::sync::mpsc::channel(if defer_writes {
8 * 1024 * 1024 / CHUNK_SIZE as usize
const APPROX_WORK_ITEM_SIZE: usize = CHUNK_SIZE as usize + 300;
8 * 1024 * 1024 / APPROX_WORK_ITEM_SIZE
} else {
1
});