Function casper_node::utils::wait_for_arc_drop [−][src]
pub async fn wait_for_arc_drop<T>(
arc: Arc<T>,
attempts: usize,
retry_delay: Duration
) -> bool
Expand description
Wait until all strong references for a particular arc have been dropped.
Downgrades and immediately drops the Arc, keeping only a weak reference. The reference will
then be polled attempts times, unless it has a strong reference count of 0.
Returns whether or not arc has zero strong references left.
Note
Using this function is usually a potential architectural issue and it should be used very
sparingly. Consider introducing a different access pattern for the value under Arc.