Skip to content

Commit 9ebdd60

Browse files
committed
Use stricter ordering
1 parent ce48cbb commit 9ebdd60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/audio_unit/macos_helpers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ impl AliveListener {
650650
&data_size as *const _ as *mut _,
651651
&alive as *const _ as *mut _,
652652
);
653-
self_ptr.alive.store(alive > 0, Ordering::Relaxed);
653+
self_ptr.alive.store(alive > 0, Ordering::SeqCst);
654654
result
655655
}
656656

@@ -687,6 +687,6 @@ impl AliveListener {
687687

688688
/// Check if the device is still alive.
689689
pub fn is_alive(&self) -> bool {
690-
self.alive.load(Ordering::Relaxed)
690+
self.alive.load(Ordering::SeqCst)
691691
}
692692
}

0 commit comments

Comments
 (0)