yield in loop when the channel is not disconnected

This commit is contained in:
Louis Dureuil 2024-02-08 18:21:27 +01:00 committed by ManyTheFish
parent 7877788510
commit 7efb1cae11

View File

@ -497,6 +497,8 @@ where
// If no more chunk remains in the chunk accumulator and the channel is disconected, break.
} else if status == crossbeam_channel::RecvTimeoutError::Disconnected {
break;
} else {
rayon::yield_now();
}
}
Ok(result) => {