diff --git a/src/derived/slot.rs b/src/derived/slot.rs index 7814a680..e0c608a6 100644 --- a/src/derived/slot.rs +++ b/src/derived/slot.rs @@ -354,7 +354,12 @@ where }, }); - let result = future.wait().unwrap_or_else(|| Canceled::throw()); + let result = future.wait().unwrap_or_else(|| { + // If the other thread panics, we treat this as cancelation: there is no + // need to panic ourselves, since the original panic will already invoke + // the panic hook and bubble up to the thread boundary (or be caught). + Canceled::throw() + }); ProbeState::UpToDate(if result.cycle.is_empty() { Ok(result.value) } else {