Skip to content

Commit

Permalink
Fix typo in core::sync::atomic::compiler_fence example
Browse files Browse the repository at this point in the history
  • Loading branch information
juniorbassani committed Jul 6, 2021
1 parent a87fb18 commit 0d61e6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2714,7 +2714,7 @@ pub fn fence(order: Ordering) {
/// Without `compiler_fence`, the `assert_eq!` in following code
/// is *not* guaranteed to succeed, despite everything happening in a single thread.
/// To see why, remember that the compiler is free to swap the stores to
/// `IMPORTANT_VARIABLE` and `IS_READ` since they are both
/// `IMPORTANT_VARIABLE` and `IS_READY` since they are both
/// `Ordering::Relaxed`. If it does, and the signal handler is invoked right
/// after `IS_READY` is updated, then the signal handler will see
/// `IS_READY=1`, but `IMPORTANT_VARIABLE=0`.
Expand Down

0 comments on commit 0d61e6e

Please sign in to comment.