Skip to content

Commit f498126

Browse files
stbuehlercramertj
authored andcommitted
Use Relaxed in AtomicWaker::register example (see #942)
1 parent 78c5d85 commit f498126

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

futures-core/src/task/__internal/atomic_waker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ impl AtomicWaker {
172172
/// use futures::future::Future;
173173
/// use futures::task::{Context, Poll, AtomicWaker};
174174
/// use std::sync::atomic::AtomicBool;
175-
/// use std::sync::atomic::Ordering::SeqCst;
175+
/// use std::sync::atomic::Ordering::Relaxed;
176176
/// use std::pin::Pin;
177177
///
178178
/// struct Flag {
@@ -188,7 +188,7 @@ impl AtomicWaker {
188188
/// // that would result in lost notifications.
189189
/// self.waker.register(cx.waker());
190190
///
191-
/// if self.set.load(SeqCst) {
191+
/// if self.set.load(Relaxed) {
192192
/// Poll::Ready(())
193193
/// } else {
194194
/// Poll::Pending

0 commit comments

Comments
 (0)