-
Notifications
You must be signed in to change notification settings - Fork 474
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
Seal traits that only intended to be implemented within the crate that defines them #620
Comments
For other traits:
|
|
Ah, given that the standard library deprecated the methods that use a single ordering for CAS operation, I think it makes sense to remove EDIT: opened #621 for this. |
Currently, crossbeam provides the following traits:
https://docs.rs/crossbeam/0.8.0/crossbeam/all.html
Some of these seem intended to be implemented for a particular type and not intended to be implemented by the user.
If I understand correctly, the traits below are not intended to be implemented by the user:
epoch::CompareAndSetOrdering
I don't think it makes sense to implement this other thanOrdering
and(Ordering, Ordering)
.EDIT: See Remove CompareAndSetOrdering trait and change compere_and_set to always use two orderings #621
epoch::Pointer
The document says it's a trait for
Owned
andOwned
.I would prefer to seal these traits using the sealed trait pattern described in API guidelines to prevent them from being accidentally implemented by the user. (Even if we never plan to make breaking changes to these APIs, I believe it's still worthwhile to prevent users from accidentally implementing these traits.)
The text was updated successfully, but these errors were encountered: