We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
GCX_PTR
1 parent f4cecad commit bfd42e9Copy full SHA for bfd42e9
compiler/rustc_middle/src/ty/context/tls.rs
@@ -199,6 +199,10 @@ impl GcxPtr {
199
200
unsafe impl Sync for GcxPtr {}
201
202
+/// This is needed to allow the deadlock handler access to `GlobalCtxt` to look for query cycles.
203
+/// It cannot use the `TLV` global is that's only guaranteed to be defined on the thread creating
204
+/// the `GlobalCtxt`. Other thread have access to the `TLV` only inside Rayon jobs, but the
205
+/// deadlock handler is not called inside such a job.
206
scoped_tls::scoped_thread_local! {
207
pub static GCX_PTR: GcxPtr
208
}
0 commit comments