1
0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-09-29 03:43:25 +02:00

Locking stdout for writing in a tight loop.

This commit is contained in:
phayes 2020-01-13 14:36:28 -08:00
parent 8d251af29f
commit ec1233bca3
No known key found for this signature in database
GPG Key ID: 728E71482E8E0832

@ -125,7 +125,7 @@ fn write_hex_output(mut output: blake3::OutputReader, mut len: u64) -> Result<()
}
fn write_raw_output(mut output: blake3::OutputReader, mut len: u64) -> Result<()> {
let mut stdout = std::io::stdout();
let mut stdout = std::io::stdout().lock();
let mut block = [0; blake3::BLOCK_LEN];
while len > 0 {
output.fill(&mut block);