make AtomicArc Send/Sync

This commit is contained in:
soruh 2023-08-13 21:28:47 +02:00
parent 6172bdf76b
commit f3915db754
2 changed files with 3 additions and 2 deletions

View File

@ -11,6 +11,9 @@ pub struct AtomicArc<T> {
_phantom: PhantomData<Arc<T>>, _phantom: PhantomData<Arc<T>>,
} }
unsafe impl<T> Send for AtomicArc<T> where T: Send {} // TODO
unsafe impl<T> Sync for AtomicArc<T> where T: Sync {} // TODO
impl<T> Drop for AtomicArc<T> { impl<T> Drop for AtomicArc<T> {
fn drop(&mut self) { fn drop(&mut self) {
unsafe { Arc::decrement_strong_count(self.load()) } unsafe { Arc::decrement_strong_count(self.load()) }

View File

@ -334,8 +334,6 @@ pub struct Db<R> {
_phantom: PhantomData<R>, _phantom: PhantomData<R>,
} }
unsafe impl<R> Send for Db<R> where R: Send {} // TODO
struct SnapshotAndFreeList<R> { struct SnapshotAndFreeList<R> {
snapshot: Arc<Snapshot<R>>, snapshot: Arc<Snapshot<R>>,
to_free: Vec<FileRange>, to_free: Vec<FileRange>,