Module std::sync::arc
Atomically reference counted data
This modules contains the implementation of an atomically reference counted pointer for the purpose of sharing data between tasks. This is obviously a very unsafe primitive to use, but it has its use cases when implementing concurrent data structures and similar tasks.
Great care must be taken to ensure that data races do not arise through the
usage of UnsafeArc
, and this often requires some form of external
synchronization. The only guarantee provided to you by this class is that
the underlying data will remain valid (not free'd) so long as the reference
count is greater than one.
Structs
UnsafeArc | An atomically reference counted pointer. |