-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add backoff feature #16
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
Conversation
I chose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! The implementation looks good to me, but I'm not sure if controlling the behavior through a feature gate is a good idea. Cargo unifies features across dependencies, so other dependencies that also depend on spinning_top
could then silently change the behavior of your crate.
So I think it would be better to control this in a different way, e.g. through a new optional type parameter on RawSpinlock
or a separate RawSpinlockBackoff
type. What do you think?
Yeah, it makes sense to control this per mutex and not globally. I gave optional type parameters a go. Unfortunately, Rust cannot infer the default type in all cases, requiring |
I'm fine with bumping the minor version, but I don't like the How about the following:
? |
Done. 👍 Similarly, one has to write Another thing to decide: do we want to export all of these different type aliases at the root of the crate or do we want to put them in modules? We could move things to |
Thanks!
Yeah, I think this is fine.
How about moving the guard types into a |
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
Sounds good. Done. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Closes #14