History

fix: ScopedJoinHandle is not always available

Alexis (Poliorcetics) Bourget committed 3 years ago

Commit cd747f91 parent bcad5c21 file · +4 −1Browse files

Unified · Split

gix-pack/src/cache/delta/traverse/resolve.rs+4−1
@@ -357,7 +357,10 @@ where · 356 unmodified lines
357 // but may instead find a good way to set the polling interval instead of hard-coding it.357 // but may instead find a good way to set the polling interval instead of hard-coding it.
358 std::thread::sleep(poll_interval);358 std::thread::sleep(poll_interval);
359 // Get out of threads are already starving or they would be starving soon as no work is left.359 // Get out of threads are already starving or they would be starving soon as no work is left.
360 if threads.iter().any(std::thread::ScopedJoinHandle::is_finished) {360 //
361 // Lint: ScopedJoinHandle is not the same depending on active features and is not exposed in some cases.
362 #[allow(clippy::redundant_closure_for_method_calls)]
363 if threads.iter().any(|t| t.is_finished()) {
361 let mut running_threads = Vec::new();364 let mut running_threads = Vec::new();
362 for thread in threads.drain(..) {365 for thread in threads.drain(..) {
363 if thread.is_finished() {366 if thread.is_finished() {