Skip to main content

rcu_ptr_to_arc

Function rcu_ptr_to_arc 

Source
pub unsafe fn rcu_ptr_to_arc<'a, T>(ptr: RcuPtrRef<'a, T>) -> Arc<T> ⓘ
Expand description

Reconstruct an Arc from an RcuPtrRef by incrementing its strong count.

§Safety

The caller must guarantee that the pointer was obtained from Arc::into_raw() and that the Arc’s strong count is non zero.

If the underlying Arc strong count may drop to zero, such as by having outstanding Weak pointers, use rcu_ptr_upgrade to first check that the pointer is valid to reconstruct.