Skip to content

Commit

Permalink
Uses Acquire/Release semantics for SlotCache::is_frozen (#4222)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Dec 30, 2024
1 parent 5662eee commit b778359
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions accounts-db/src/accounts_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ impl SlotCacheInner {
}

pub fn mark_slot_frozen(&self) {
self.is_frozen.store(true, Ordering::SeqCst);
self.is_frozen.store(true, Ordering::Release);
}

pub fn is_frozen(&self) -> bool {
self.is_frozen.load(Ordering::SeqCst)
self.is_frozen.load(Ordering::Acquire)
}

pub fn total_bytes(&self) -> u64 {
Expand Down

0 comments on commit b778359

Please sign in to comment.