Re: [PATCH v3 2/2] rust: sync: add `Arc::into_unique_or_drop`

From: Benno Lossin
Date: Mon Mar 11 2024 - 13:42:07 EST


On 3/11/24 17:08, Alice Ryhl wrote:
> Decrement the refcount of an `Arc`, but handle the case where it hits
> zero by taking ownership of the now-unique `Arc`, instead of destroying
> and deallocating it.
>
> This is a dependency of the linked list that Rust Binder uses. The
> linked list uses this method as part of its `ListArc` abstraction.
>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

Reviewed-by: Benno Lossin <benno.lossin@xxxxxxxxx>