diff options
Diffstat (limited to 'library/std/src/sync/mpmc/array.rs')
| -rw-r--r-- | library/std/src/sync/mpmc/array.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/sync/mpmc/array.rs b/library/std/src/sync/mpmc/array.rs index a467237fef1..880d8b5f57c 100644 --- a/library/std/src/sync/mpmc/array.rs +++ b/library/std/src/sync/mpmc/array.rs @@ -16,13 +16,13 @@ use super::waker::SyncWaker; use crate::cell::UnsafeCell; use crate::mem::MaybeUninit; use crate::ptr; -use crate::sync::atomic::{self, AtomicUsize, Ordering}; +use crate::sync::atomic::{self, Atomic, AtomicUsize, Ordering}; use crate::time::Instant; /// A slot in a channel. struct Slot<T> { /// The current stamp. - stamp: AtomicUsize, + stamp: Atomic<usize>, /// The message in this slot. Either read out in `read` or dropped through /// `discard_all_messages`. @@ -55,7 +55,7 @@ pub(crate) struct Channel<T> { /// represent the lap. The mark bit in the head is always zero. /// /// Messages are popped from the head of the channel. - head: CachePadded<AtomicUsize>, + head: CachePadded<Atomic<usize>>, /// The tail of the channel. /// @@ -64,7 +64,7 @@ pub(crate) struct Channel<T> { /// represent the lap. The mark bit indicates that the channel is disconnected. /// /// Messages are pushed into the tail of the channel. - tail: CachePadded<AtomicUsize>, + tail: CachePadded<Atomic<usize>>, /// The buffer holding slots. buffer: Box<[Slot<T>]>, |
