diff --git a/compiler/rustc_thread_pool/src/latch.rs b/compiler/rustc_thread_pool/src/latch.rs index 58dabaf35c00..29c85146e4f1 100644 --- a/compiler/rustc_thread_pool/src/latch.rs +++ b/compiler/rustc_thread_pool/src/latch.rs @@ -117,7 +117,7 @@ pub(super) fn wake_up(&self) { /// latch code. #[inline] unsafe fn set(this: *const Self) -> bool { - let old_state = unsafe { (*this).state.swap(SET, Ordering::AcqRel) }; + let old_state = unsafe { (*this).state.swap(SET, Ordering::SeqCst) }; old_state == SLEEPING }