diff options
| author | bors <bors@rust-lang.org> | 2015-04-30 00:07:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-30 00:07:10 +0000 |
| commit | 5449f5d29e175230a1285ebe92394f50c76e1df6 (patch) | |
| tree | c89deb8cc68b46e6fc768e862c32bd3e830a31c3 /src/libstd/sync | |
| parent | 551a74dddd84cf01440ee84148ebd18bc68bd7c8 (diff) | |
| parent | 1b34c099a6a624947877315875018093587a8834 (diff) | |
| download | rust-5449f5d29e175230a1285ebe92394f50c76e1df6.tar.gz rust-5449f5d29e175230a1285ebe92394f50c76e1df6.zip | |
Auto merge of #24967 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/once.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs index 2ce974c1271..2d712369228 100644 --- a/src/libstd/sync/once.rs +++ b/src/libstd/sync/once.rs @@ -59,7 +59,11 @@ impl Once { /// routine is currently running. /// /// When this function returns, it is guaranteed that some initialization - /// 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 + /// guaranteed that any memory writes performed by the executed closure can + /// be reliably observed by other tasks at this point (there is a + /// happens-before relation between the closure and code executing after the + /// return). #[stable(feature = "rust1", since = "1.0.0")] pub fn call_once<F>(&'static self, f: F) where F: FnOnce() { // Optimize common path: load is much cheaper than fetch_add. |
