From 3d69afaab242fc1dd3a0658eb363b2df5e02fcd6 Mon Sep 17 00:00:00 2001 From: Ibraheem Ahmed Date: Sat, 22 Jan 2022 19:11:24 -0500 Subject: [PATCH] Fix memory ordering in `RawIter::next` --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index f26f6ed..33b79d6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -378,7 +378,7 @@ impl RawIter { fn next<'a, T: Send + Sync>(&mut self, thread_local: &'a ThreadLocal) -> Option<&'a T> { while self.bucket < BUCKETS { let bucket = unsafe { thread_local.buckets.get_unchecked(self.bucket) }; - let bucket = bucket.load(Ordering::Relaxed); + let bucket = bucket.load(Ordering::Acquire); if !bucket.is_null() { while self.index < self.bucket_size {