use Mutex;
use Arc;
// Wrap arbitrary `Send` guards so `Registration` can store them behind
// `Arc<dyn Send + Sync>` while still dropping the guard on last handle release.
;
/// A shared lifecycle token for a [`Registered`](super::Registered) metric handle.
///
/// When the last clone of the associated [`Registered`](super::Registered)
/// handle is dropped, this registration is dropped as well. Runtime-managed
/// metrics use that drop to unregister themselves from the runtime registry,
/// while external callers may attach custom cleanup with [`Registration::from`].