make F64Table concurency safe
This commit is contained in:
10
src/rcu.rs
10
src/rcu.rs
@@ -189,16 +189,24 @@ impl<T: ?Sized, M: ?Sized> RcuRef<T, M> {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn same_epoch(this: &Self, other: &Self) -> bool {
|
||||
pub fn same_epoch<M2>(this: &Self, other: &RcuRef<T, M2>) -> bool {
|
||||
Arc::ptr_eq(&this.arc, &other.arc)
|
||||
}
|
||||
|
||||
pub fn ptr_eq(this: &Self, other: &Self) -> bool {
|
||||
this.data == other.data
|
||||
}
|
||||
|
||||
pub fn clone(this: &Self) -> Self {
|
||||
Self {
|
||||
arc: Arc::clone(&this.arc),
|
||||
data: this.data,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_root(this: &Self) -> &T {
|
||||
&this.arc
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: ?Sized, M: ?Sized> Deref for RcuRef<T, M> {
|
||||
|
||||
Reference in New Issue
Block a user