Browse Source

Remove a panic in the cache worker (#922)

This panic can now be hit occasionally since the worker is indeed
dropped, and the comment about the static no longer applies.
pull/930/head
Alex Crichton 5 years ago
committed by GitHub
parent
commit
151075d553
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      crates/environ/src/cache/worker.rs

6
crates/environ/src/cache/worker.rs

@ -217,12 +217,6 @@ impl WorkerThread {
condvar.notify_all(); condvar.notify_all();
} }
} }
// The receiver can stop iteration iff the channel has hung up.
// The channel will hung when sender is dropped. It only happens in tests.
// In non-test case we have static worker and Rust doesn't drop static variables.
#[cfg(not(test))]
unreachable!()
} }
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]

Loading…
Cancel
Save