pub struct RcuArc<T: Send + Sync + 'static> { /* private fields */ }Expand description
An RCU (Read-Copy-Update) version of Arc.
This Arc can be read from multiple threads concurrently without blocking. When the Arc is written, reads may continue to see the old value of the Arc for some period of time.
Implementations§
Source§impl<T: Send + Sync + 'static> RcuArc<T>
impl<T: Send + Sync + 'static> RcuArc<T>
Sourcepub fn read(&self) -> RcuReadGuard<T>
pub fn read(&self) -> RcuReadGuard<T>
Read the value of the RCU Arc.
The object referenced by the RCU Arc will remain valid until the RcuReadGuard is dropped.
However, another thread running concurrently might see a different value for the object.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for RcuArc<T>
impl<T> RefUnwindSafe for RcuArc<T>
impl<T> Send for RcuArc<T>
impl<T> Sync for RcuArc<T>
impl<T> Unpin for RcuArc<T>
impl<T> UnwindSafe for RcuArc<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more