File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
compiler/rustc_query_system/src/query Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -506,9 +506,15 @@ pub fn break_query_cycles(query_map: QueryMap, registry: &rayon_core::Registry)
506
506
) ;
507
507
}
508
508
509
- // FIXME: Ensure this won't cause a deadlock before we return
509
+ // Mark all the thread we're about to wake up as unblocked. This needs to be done before
510
+ // we wake the threads up as otherwise Rayon could detect a deadlock if a thread we
511
+ // resumed fell asleep and this thread had yet to mark the remaining threads as unblocked.
512
+ for _ in 0 ..wakelist. len ( ) {
513
+ rayon_core:: mark_unblocked ( registry) ;
514
+ }
515
+
510
516
for waiter in wakelist. into_iter ( ) {
511
- waiter. notify ( registry ) ;
517
+ waiter. condvar . notify_one ( ) ;
512
518
}
513
519
}
514
520
You can’t perform that action at this time.
0 commit comments