File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,11 @@ impl Once {
59
59
/// routine is currently running.
60
60
///
61
61
/// When this function returns, it is guaranteed that some initialization
62
- /// has run and completed (it may not be the closure specified).
62
+ /// 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).
63
67
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
64
68
pub fn call_once < F > ( & ' static self , f : F ) where F : FnOnce ( ) {
65
69
// Optimize common path: load is much cheaper than fetch_add.
You can’t perform that action at this time.
0 commit comments