Skip to content

Conversation

@khuey
Copy link
Contributor

@khuey khuey commented Dec 13, 2022

Shared already has Arc's strong_count and weak_count. This will make it easier to implement PartialEq/Eq for structs containing a Shared.

@khuey khuey requested a review from taiki-e as a code owner December 13, 2022 02:55
@khuey
Copy link
Contributor Author

khuey commented Dec 13, 2022

Hrm, I want to be able to hash it too. Perhaps I should expose a pointer value (e.g. with a Shared::as_ptr that returns an opaque pointer value) rather than adding Shared::ptr_eq.

@khuey
Copy link
Contributor Author

khuey commented Dec 13, 2022

Or how about this?

Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks!

@taiki-e taiki-e merged commit 0f83c20 into rust-lang:master Jan 1, 2023
@taiki-e taiki-e added A-future Area: futures::future 0.3-backport: pending The maintainer accepted to backport this to the 0.3 branch, but backport has not been done yet. labels Jan 1, 2023
@taiki-e taiki-e added 0.3-backport: completed and removed 0.3-backport: pending The maintainer accepted to backport this to the 0.3 branch, but backport has not been done yet. labels Jan 30, 2023
taiki-e pushed a commit that referenced this pull request Jan 30, 2023
taiki-e pushed a commit that referenced this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants