Skip to content

Commit

Permalink
Formatting and addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
james7132 authored and Amanieu committed Feb 20, 2024
1 parent 5a512c4 commit 66a0d00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ impl<T: Send> ThreadLocal<T> {
}
unsafe {
let entry = &*bucket_ptr.add(thread.index);
if entry.present.load(Ordering::Acquire) {
if entry.present.load(Ordering::Relaxed) {
Some(&*(&*entry.value.get()).as_ptr())
} else {
None
Expand Down Expand Up @@ -526,10 +526,10 @@ unsafe fn deallocate_bucket<T>(bucket: *mut Entry<T>, size: usize) {
mod tests {
use super::ThreadLocal;
use std::cell::RefCell;
use std::hint::black_box;
use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering::Relaxed;
use std::sync::Arc;
use std::hint::black_box;
use std::thread;

fn make_create() -> Arc<dyn Fn() -> usize + Send + Sync> {
Expand Down

0 comments on commit 66a0d00

Please sign in to comment.