rust/compiler/rustc_interface/src
bors 8c52a83c45 Auto merge of #98570 - SparrowLii:deadlock, r=cjgillot
get rid of `tcx` in deadlock handler when parallel compilation

This is a very obscure and hard-to-trace problem that affects thread scheduling. If we copy `tcx` to the deadlock handler thread, it will perform unpredictable behavior and cause very weird problems when executing `try_collect_active_jobs`(For example, the deadlock handler thread suddenly preempts the content of the blocked worker thread and executes the unknown judgment branch, like #94654).
Fortunately we can avoid this behavior by precomputing `query_map`. This change fixes the following ui tests failure on my environment when set `parallel-compiler = true`:
```
    [ui] src/test\ui\async-await\no-const-async.rs
    [ui] src/test\ui\infinite\infinite-struct.rs
    [ui] src/test\ui\infinite\infinite-tag-type-recursion.rs
    [ui] src/test\ui\issues\issue-3008-1.rs
    [ui] src/test\ui\issues\issue-3008-2.rs
    [ui] src/test\ui\issues\issue-32326.rs
    [ui] src/test\ui\issues\issue-57271.rs
    [ui] src/test\ui\issues\issue-72554.rs
    [ui] src/test\ui\parser\fn-header-semantic-fail.rs
    [ui] src/test\ui\union\union-nonrepresentable.rs
```

Updates #75760
Fixes #94654
2022-07-03 02:05:14 +00:00
..
callbacks.rs typo 2022-05-23 22:51:34 +02:00
interface.rs Add support for values() with --check-cfg 2022-03-03 12:00:28 +01:00
lib.rs Fully stabilize NLL 2022-06-03 17:16:41 -04:00
passes.rs Auto merge of #97235 - nbdd0121:unwind, r=Amanieu 2022-07-02 14:06:27 +00:00
proc_macro_decls.rs update Finder to store LocalDefId 2022-04-09 14:00:22 -04:00
queries.rs only_local: always check for misuse 2022-05-10 12:07:35 +02:00
tests.rs Add -Zvirtual-function-elimination flag 2022-06-14 14:50:51 +02:00
util.rs get rid of tcx in deadlock handler when parallel compilation 2022-06-29 10:02:30 +08:00