Skip to content

Commit

Permalink
Fix memory ordering in RawIter::next
Browse files Browse the repository at this point in the history
  • Loading branch information
ibraheemdev authored Jan 23, 2022
1 parent c7d8dcd commit 3d69afa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ impl RawIter {
fn next<'a, T: Send + Sync>(&mut self, thread_local: &'a ThreadLocal<T>) -> 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 {
Expand Down

0 comments on commit 3d69afa

Please sign in to comment.