Initial check to use block_in_place

This commit is contained in:
Igor Katson 2021-10-10 10:58:09 +01:00
parent 2ac76683e6
commit 99208800f4

View file

@ -198,8 +198,10 @@ impl TorrentManager {
debug!("computed lengths: {:?}", &lengths);
info!("Doing initial checksum validation, this might take a while...");
let initial_check_results = FileOps::<Sha1>::new(&info, &files, &lengths)
.initial_check(options.only_files.as_deref())?;
let initial_check_results = spawner.spawn_block_in_place(|| {
FileOps::<Sha1>::new(&info, &files, &lengths)
.initial_check(options.only_files.as_deref())
})?;
info!(
"Initial check results: have {}, needed {}",