diff options
| author | SparrowLii <liyuan179@huawei.com> | 2022-06-29 10:02:30 +0800 |
|---|---|---|
| committer | SparrowLii <liyuan179@huawei.com> | 2022-06-29 10:02:30 +0800 |
| commit | fbca21edd27dcd6e49a8020ed77a133ffa357c63 (patch) | |
| tree | 2e95e882f80b978ca28d27324f23eb5b07e0c2d4 /compiler/rustc_query_system | |
| parent | 3b0d4813ab461ec81eab8980bb884691c97c5a35 (diff) | |
| download | rust-fbca21edd27dcd6e49a8020ed77a133ffa357c63.tar.gz rust-fbca21edd27dcd6e49a8020ed77a133ffa357c63.zip | |
get rid of `tcx` in deadlock handler when parallel compilation
Diffstat (limited to 'compiler/rustc_query_system')
| -rw-r--r-- | compiler/rustc_query_system/src/query/job.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs index 2a07d9b7f80..f1316557c29 100644 --- a/compiler/rustc_query_system/src/query/job.rs +++ b/compiler/rustc_query_system/src/query/job.rs @@ -492,14 +492,13 @@ fn remove_cycle( /// There may be multiple cycles involved in a deadlock, so this searches /// all active queries for cycles before finally resuming all the waiters at once. #[cfg(parallel_compiler)] -pub fn deadlock<CTX: QueryContext>(tcx: CTX, registry: &rayon_core::Registry) { +pub fn deadlock(query_map: QueryMap, registry: &rayon_core::Registry) { let on_panic = OnDrop(|| { eprintln!("deadlock handler panicked, aborting process"); process::abort(); }); let mut wakelist = Vec::new(); - let query_map = tcx.try_collect_active_jobs().unwrap(); let mut jobs: Vec<QueryJobId> = query_map.keys().cloned().collect(); let mut found_cycle = false; |
