Skip to content

Commit 99e3329

Browse files
committed
Implement Send/Sync for VolatilePtr
Possible because of reference-based design.
1 parent b7cb879 commit 99e3329

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ptr.rs

+3
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,9 @@ impl<'a, T, A, const N: usize> VolatilePtr<'a, [T; N], A> {
960960
}
961961
}
962962

963+
unsafe impl<T, A> Send for VolatilePtr<'_, T, A> where T: Sync {}
964+
unsafe impl<T, A> Sync for VolatilePtr<'_, T, A> where T: Sync {}
965+
963966
impl<T, A> fmt::Debug for VolatilePtr<'_, T, A>
964967
where
965968
T: Copy + fmt::Debug + ?Sized,

0 commit comments

Comments
 (0)