compiler_fence documentation is misleading #129189
Labels
A-concurrency
Area: Concurrency
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
C-discussion
Category: Discussion or questions that doesn't represent real issues.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
T-opsem
Relevant to the opsem team
The current docs for
compiler_fence
explain that function in terms of reorderings:That's somewhat misleading. For good reasons, our
fence
docs quickly transition from "reordering" to "synchronization" terminology:compiler_fence
should also be explained in terms of synchronizes-with, to avoid raising any false expectations. Specifically, compiler_fence is equivalent to C++atomic_signal_fence
, and so its synchronization rules are very similar to those offence
except that synchronization only occurs between a thread and its signal handler, not across different threads.Cc @rust-lang/libs-api @rust-lang/opsem
Cc rust-lang/unsafe-code-guidelines#347 #54962
The text was updated successfully, but these errors were encountered: