We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a0af01 commit b84f018Copy full SHA for b84f018
src/libstd/sync/once.rs
@@ -59,7 +59,11 @@ impl Once {
59
/// routine is currently running.
60
///
61
/// When this function returns, it is guaranteed that some initialization
62
- /// has run and completed (it may not be the closure specified).
+ /// has run and completed (it may not be the closure specified). It is also
63
+ /// guaranteed that any memory writes performed by the executed closure can
64
+ /// be reliably observed by other tasks at this point (there is a
65
+ /// happens-before relation between the closure and code executing after the
66
+ /// return).
67
#[stable(feature = "rust1", since = "1.0.0")]
68
pub fn call_once<F>(&'static self, f: F) where F: FnOnce() {
69
// Optimize common path: load is much cheaper than fetch_add.
0 commit comments