parc
This crate exposes ParentArc<T>
which is comparable to an Arc<T>
but "strong" references cannot be cloned. This allows the ParentArc<T>
to lock its weak references and block until all strong references are dropped. Once it is the only reference it can be consummed safely.
Usage
This crate is compatible with #![no_std]
environnement that provides an allocator.
[]
= {="1", =false} # for no_std
Example
use ParentArc;
use thread;
use sync;