Skip to content

Conversation

quantpoet
Copy link
Contributor

@quantpoet quantpoet commented Sep 19, 2025

Replace load-then-store patterns with atomic compare_exchange operations to eliminate race conditions.

The changes ensure thread-safe initialization and prevent duplicate operations in multi-threaded scenarios.

Signed-off-by: quantpoet <quantway@outlook.com>
Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

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

Thanks!

@NobodyXu NobodyXu merged commit d740f9b into rust-lang:main Sep 19, 2025
77 checks passed
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