diff options
author | Christoph Prokop <christoph.prokop@atos.net> | 2021-01-05 19:55:11 +0100 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-01-11 21:24:37 +0100 |
commit | 5bb9b285d8c7b1071f955d0608fcc683c423ac31 (patch) | |
tree | 394f47706253b9e9feeb87f9e46121244b59e194 /src/package/script.rs | |
parent | 1cfb017369b5dcaaa2a7da6dc9b862f0bbe6d9c5 (diff) |
Fix: Do not use tokio in SourceEntry::verify_hash()
Because tokio seems to block forever here when "read()"ing the file to
memory, we use the `std::fs` API here.
This blocks, but is called async in tokio anyways, so we at least get
_some_ parallelization.
It is at least "a bit" parallelized, as this only allows parallelization
up to N `read()`s, where N is the number of tokio runtime threads, which
is the number of cores of the machine this is called on.
The `tokio::fs` API is a wrapper around `std::fs` anyways, right now.
So until tokio can work with async OS API calls (io_uring anyone?),
this is not worse as `tokio::fs`.
Signed-off-by: Christoph Prokop <christoph.prokop@atos.net>
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Tested-by: Christoph Prokop <christoph.prokop@atos.net>
Tested-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/package/script.rs')
0 files changed, 0 insertions, 0 deletions