mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 14:24:08 +00:00
Don't panic when waiting on poisoned queries
This commit is contained in:
parent
5257aee7dd
commit
dd0004a129
@ -285,9 +285,8 @@ where
|
|||||||
let lock = query.query_state(qcx).active.get_shard_by_value(&key).lock();
|
let lock = query.query_state(qcx).active.get_shard_by_value(&key).lock();
|
||||||
|
|
||||||
match lock.get(&key) {
|
match lock.get(&key) {
|
||||||
Some(QueryResult::Poisoned) => {
|
// The query we waited on panicked. Continue unwinding here.
|
||||||
panic!("query '{}' not cached due to poisoning", query.name())
|
Some(QueryResult::Poisoned) => FatalError.raise(),
|
||||||
}
|
|
||||||
_ => panic!(
|
_ => panic!(
|
||||||
"query '{}' result must be in the cache or the query must be poisoned after a wait",
|
"query '{}' result must be in the cache or the query must be poisoned after a wait",
|
||||||
query.name()
|
query.name()
|
||||||
|
Loading…
Reference in New Issue
Block a user