mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-30 00:12:48 +00:00
Explain why we don't duplicate panics from other threads
This commit is contained in:
parent
bb4b42acf1
commit
018658b450
1 changed files with 6 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue