Skip to content
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

Shorten path prefix about std::sync::atomic::Ordering #107

Closed
wants to merge 2 commits into from

Conversation

ppdogg
Copy link
Contributor

@ppdogg ppdogg commented Dec 18, 2024

No description provided.

Copy link
Owner

@skyzh skyzh left a comment

Choose a reason for hiding this comment

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

the reason I didn't do that is we have both atomic::Ordering and cmp::Ordering and it usually messes up things when being imported into the global namespace. I'd rather do use std::sync::atomic::Ordering as AtomicOrdering, or use std::sync::atomic then do atomic::Ordering when using it?

@ppdogg
Copy link
Contributor Author

ppdogg commented Dec 18, 2024

I think use std::sync::atomic then do atomic::Ordering is better, different from cmp::Ordering but with shorter path prefix.
Also, I see direct use Ordering in txn.rs, is that because there will be conflicts in other srcs but no conflict in this particular src?

@ppdogg ppdogg closed this Dec 19, 2024
@skyzh
Copy link
Owner

skyzh commented Dec 19, 2024

Also, I see direct use Ordering in txn.rs, is that because there will be conflicts in other srcs but no conflict in this particular src?

I would have avoided that, and I can have a patch to fix it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants