feat: add backoff feature - #16
Conversation
|
I chose |
phil-opp
left a comment
There was a problem hiding this comment.
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. 👍 |

Closes #14