Skip to content

Commit 877d3f2

Browse files
Remove on_propagated_panic
1 parent 5ac74ab commit 877d3f2

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/derived/slot.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use crate::blocking_future::{BlockingFuture, Promise};
21
use crate::debug::TableEntry;
32
use crate::derived::MemoizationPolicy;
43
use crate::durability::Durability;
@@ -10,6 +9,10 @@ use crate::revision::Revision;
109
use crate::runtime::Runtime;
1110
use crate::runtime::RuntimeId;
1211
use crate::runtime::StampedValue;
12+
use crate::{
13+
blocking_future::{BlockingFuture, Promise},
14+
Canceled,
15+
};
1316
use crate::{
1417
CycleError, Database, DatabaseKeyIndex, DiscardIf, DiscardWhat, Event, EventKind, QueryDb,
1518
SweepStrategy,
@@ -353,7 +356,7 @@ where
353356
},
354357
});
355358

356-
let result = future.wait().unwrap_or_else(|| db.on_propagated_panic());
359+
let result = future.wait().unwrap_or_else(|| Canceled::throw());
357360
ProbeState::UpToDate(if result.cycle.is_empty() {
358361
Ok(result.value)
359362
} else {
@@ -576,7 +579,7 @@ where
576579
// Release our lock on `self.state`, so other thread can complete.
577580
std::mem::drop(state);
578581

579-
let result = future.wait().unwrap_or_else(|| db.on_propagated_panic());
582+
let result = future.wait().unwrap_or_else(|| Canceled::throw());
580583
return !result.cycle.is_empty() || result.value.changed_at > revision;
581584
}
582585

src/lib.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ pub trait Database: plumbing::DatabaseOps {
7474
#![allow(unused_variables)]
7575
}
7676

77-
/// This function is invoked when a dependent query is being computed by the
78-
/// other thread, and that thread panics.
79-
fn on_propagated_panic(&self) -> ! {
80-
Canceled::throw()
81-
}
82-
8377
/// Gives access to the underlying salsa runtime.
8478
fn salsa_runtime(&self) -> &Runtime {
8579
self.ops_salsa_runtime()

0 commit comments

Comments
 (0)