about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2018-08-15 15:22:54 +0200
committerRalf Jung <post@ralfj.de>2018-08-15 15:22:54 +0200
commit34b65db8420ecfec94126483c7c170c270fd2ead (patch)
treecaa36bb0bb39032dafa5c8db07f3ceba47c97c1e /src/libstd
parent81cfaad030435aae447d73c66123b3df856c09cb (diff)
downloadrust-34b65db8420ecfec94126483c7c170c270fd2ead.tar.gz
rust-34b65db8420ecfec94126483c7c170c270fd2ead.zip
document effect of join on memory ordering
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/thread/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 61c6084a250..b580b1ec510 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1308,13 +1308,17 @@ impl<T> JoinHandle<T> {
         &self.0.thread
     }
 
-    /// Waits for the associated thread to finish.
+    /// Waits for the associated thread to finish. In terms of [atomic memory orderings],
+    /// the completion of the associated thread synchronizes with this function returning.
+    /// In other words, all operations performed by that thread are ordered before all
+    /// operations that happen after `join` returns.
     ///
     /// If the child thread panics, [`Err`] is returned with the parameter given
     /// to [`panic`].
     ///
     /// [`Err`]: ../../std/result/enum.Result.html#variant.Err
     /// [`panic`]: ../../std/macro.panic.html
+    /// [atomic memory orderings]: ../../std/sync/atomic/index.html
     ///
     /// # Panics
     ///