-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Optimize thread ID generation #100022
Optimize thread ID generation #100022
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @kennytm (rust-highfive has picked a reviewer for you, use r? to override) |
edit: I didn't read the code carefully enough! sorry! |
No worries! GitHub somehow has problems displaying the diff; I found it hard to read even though I wrote it 😉! |
LGTM; r=me with the suggestion applied. |
@joshtriplett Done! Should I squash commits? |
@joboet Yes, please do. |
@bors delegate+ |
✌️ @joboet can now approve this pull request |
49e721e
to
3d21c37
Compare
@bors r+ |
Rollup of 9 pull requests Successful merges: - rust-lang#100022 (Optimize thread ID generation) - rust-lang#100030 (cleanup code w/ pointers in std a little) - rust-lang#100229 (add -Zextra-const-ub-checks to enable more UB checking in const-eval) - rust-lang#100247 (Generalize trait object generic param check to aliases.) - rust-lang#100255 (Adding more verbose documentation for `std::fmt::Write`) - rust-lang#100366 (errors: don't fail on broken primary translations) - rust-lang#100396 (Suggest const and static for global variable) - rust-lang#100409 (rustdoc: don't generate DOM element for operator) - rust-lang#100443 (Add two let else regression tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
By using atomics where available, thread IDs can be generated without locking while still enforcing uniqueness.