lkml.org 
[lkml]   [2023]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] rust: arc: remove `ArcBorrow` in favour of `WithRef`
    On Fri, 22 Sep 2023 17:29:58 +0200
    Alice Ryhl <aliceryhl@google.com> wrote:

    > On Thu, Sep 21, 2023 at 11:35 PM Wedson Almeida Filho
    > <wedsonaf@gmail.com> wrote:
    > >
    > > From: Wedson Almeida Filho <walmeida@microsoft.com>
    > >
    > > With GATs, we don't need a separate type to represent a borrowed object
    > > with a refcount, we can just use Rust's regular shared borrowing. In
    > > this case, we use `&WithRef<T>` instead of `ArcBorrow<'_, T>`.
    > >
    > > Co-developed-by: Boqun Feng <boqun.feng@gmail.com>
    > > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
    > > Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
    >
    > I wonder whether "WithArc" is a better name? After all, arc is short
    > for "atomic refcount".
    > I also think it's nice to include Arc in the name of the type.
    >
    > Reviewed-by: Alice Ryhl <aliceryhl@google.com>

    Or just call it with `WithRc` -- we don't use `aloc::rc::Rc` in the
    kernel so there's no need to emphasis that this one is atomic :)

    I personally think the `WithRef` name is fine, we have a smart pointer
    called `ARef` after all :)

    Best,
    Gary

    \
     
     \ /
      Last update: 2023-09-23 02:16    [W:3.663 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site