Skip to content

binder: replace Arc<Context> with Ref<Context>. #393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

wedsonaf
Copy link

Signed-off-by: Wedson Almeida Filho [email protected]

@ksquirrel
Copy link
Member

Review of 278fca2774af:

  • ✔️ Commit 278fca2: Looks fine!

Copy link
Collaborator

@TheSven73 TheSven73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

node: None,
uid: None,
})
pub(crate) fn new() -> Result<Ref<Self>> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice you're replacing Pin<Arc<T>> with Ref<T> here. This is of course correct, since Ref<T> is now "intrinsically pinned" (or whatever name we want to give it).

Would you perhaps be open to one of the following (or both):

  1. replace Pin<Ref<T>> with Ref<T> everywhere
  2. rename Ref<T> to PinRef<T> or PinnedRef<T> or some such

(this should of course not hold up this PR)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you perhaps be open to one of the following (or both):

  1. replace Pin<Ref<T>> with Ref<T> everywhere

I will consider this as I switch users of Arc to Ref. I don't anticipate any challenges but I do run into them I'll rope you in.

  1. rename Ref<T> to PinRef<T> or PinnedRef<T> or some such

I'm open to this, but I'm not convinced yet that it's a good idea. Mostly because being pinned is a property of Ref, but it's not a defining one (being ref-counted is).

@wedsonaf wedsonaf merged commit 4f90536 into Rust-for-Linux:rust Jun 30, 2021
@wedsonaf wedsonaf deleted the context branch June 30, 2021 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants