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

Add a loom::hint module containing mocked versions of spin_loop and unreachable_unchecked #197

Merged
merged 1 commit into from
Apr 2, 2021

Conversation

thomcc
Copy link
Contributor

@thomcc thomcc commented Mar 13, 2021

std::sync::atomic::spin_loop_hint is deprecated, so loom should provide the non-deprecated replacement. It just calls the deprecated version though.

I provided unreachable_unchecked too, even though it's not exactly loom's wheelhouse, but it could help catch some UB, and lets users potentially reduce the amount of cfg special-casing they need.

@thomcc
Copy link
Contributor Author

thomcc commented Mar 13, 2021

Stable CI failure is a warning that's fixed by #195. (merged)

@carllerche
Copy link
Member

Thanks 👍

@carllerche carllerche merged commit 0d25fc0 into tokio-rs:master Apr 2, 2021
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