Skip to content

Commit

Permalink
Auto merge of rust-lang#115668 - Zoxc:deadlock-msg, r=jackh726
Browse files Browse the repository at this point in the history
Make the deadlock panic clearly refer to a deadlock
  • Loading branch information
bors committed Sep 10, 2023
2 parents 0d0ad42 + 68ffa33 commit ffe131f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/rustc_query_system/src/query/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,9 @@ pub fn deadlock<D: DepKind>(query_map: QueryMap<D>, registry: &rayon_core::Regis
// which in turn will wait on X causing a deadlock. We have a false dependency from
// X to Y due to Rayon waiting and a true dependency from Y to X. The algorithm here
// only considers the true dependency and won't detect a cycle.
assert!(found_cycle);
if !found_cycle {
panic!("deadlock detected");
}

// FIXME: Ensure this won't cause a deadlock before we return
for waiter in wakelist.into_iter() {
Expand Down

0 comments on commit ffe131f

Please sign in to comment.